1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Changed the split statement, from SplitN to Split. Doing so takes
care of cases, when a minor version is followed by a suffix, that
starts with '.'.
This commit is contained in:
Mohit Soni 2013-08-23 14:37:37 -07:00
parent e2594d162e
commit ab882da03b

View file

@ -537,7 +537,7 @@ func GetKernelVersion() (*KernelVersionInfo, error) {
release = release[:bytes.IndexByte(release, 0)]
tmp := strings.SplitN(string(release), "-", 2)
tmp2 := strings.SplitN(tmp[0], ".", 3)
tmp2 := strings.Split(tmp[0], ".")
if len(tmp2) > 0 {
kernel, err = strconv.Atoi(tmp2[0])