]> xenbits.xensource.com Git - people/gdunlap/xsatool/commitdiff
xen: Disallow majors == math.MaxInt32 as well
authorGeorge Dunlap <george.dunlap@citrix.com>
Tue, 13 Mar 2018 17:39:21 +0000 (17:39 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Tue, 13 Mar 2018 17:39:21 +0000 (17:39 +0000)
So that we can use that as an "invalid value".

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
xen.go

diff --git a/xen.go b/xen.go
index c97abc7ada9f6da265d112f157567c6748a9225f..3a9428c2c22e641166e92b720ec48c7140bc1158 100644 (file)
--- a/xen.go
+++ b/xen.go
@@ -39,7 +39,7 @@ func (v XenVersion) parse() (major, minor int, err error) {
                return
        }
 
-       if major > math.MaxInt32 {
+       if major >= math.MaxInt32 {
                err = fmt.Errorf("Version too large")
                major = -1
                return