Merge ~morphis/snappy-hwe-snaps/+git/wifi-ap:fix-int-overflow into ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master

Proposed by Simon Fels
Status: Merged
Approved by: Simon Fels
Approved revision: 25219d04aa9481222872432a1829d589168e7e8a
Merged at revision: 2f9a2a00d612fcac1015681e6e3497d512c4dee6
Proposed branch: ~morphis/snappy-hwe-snaps/+git/wifi-ap:fix-int-overflow
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master
Diff against target: 24 lines (+4/-2)
1 file modified
cmd/client/cmd_wizard.go (+4/-2)
Reviewer Review Type Date Requested Status
Simon Fels Approve
Konrad Zapałowicz (community) code Approve
System Enablement Bot continuous-integration Needs Fixing
Review via email: mp+314024@code.launchpad.net

Description of the change

Fix compilation error on armhf and i386 for too big max int value

See https://launchpadlibrarian.net/301069373/buildlog_snap_ubuntu_xenial_armhf_wifi-ap-daily_BUILDING.txt.gz for example.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

lgt

review: Approve (code)
Revision history for this message
Simon Fels (morphis) wrote :

Merging on my own until Matteo is back.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/cmd/client/cmd_wizard.go b/cmd/client/cmd_wizard.go
index 446a56c..a8b9bb2 100644
--- a/cmd/client/cmd_wizard.go
+++ b/cmd/client/cmd_wizard.go
@@ -21,7 +21,6 @@ import (
21 "encoding/json"21 "encoding/json"
22 "fmt"22 "fmt"
23 "log"23 "log"
24 "math"
25 "net"24 "net"
26 "net/http"25 "net/http"
27 "os"26 "os"
@@ -300,7 +299,10 @@ var allSteps = [...]wizardStep{
300 defer procNetRoute.Close()299 defer procNetRoute.Close()
301300
302 var iface string301 var iface string
303 minMetric := math.MaxUint32302 // Using something like math.MaxUint32 causes an overflow on
303 // some architectures so lets use just a high enough value
304 // for typical systems here.
305 minMetric := 100000
304306
305 scanner := bufio.NewScanner(procNetRoute)307 scanner := bufio.NewScanner(procNetRoute)
306 // Skip the first line with table header308 // Skip the first line with table header

Subscribers

People subscribed via source and target branches

to all changes: