1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:14:46 -07:00

internal/syscall/unix: simplify KernelVersion

Since values[2] elements are initialized with 0, the switch statement
doesn't do anything. Remove it.

Change-Id: I41176692cdf0c01fe8e85315f0c0dc8b0f3d41fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/427675
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Kir Kolyshkin 2022-09-01 14:43:39 -07:00 committed by Tobias Klauser
parent bd5595d7fa
commit e2e69ec82a

View File

@ -37,13 +37,6 @@ func KernelVersion() (major int, minor int) {
value = 0
}
}
switch vi {
case 0:
return 0, 0
case 1:
return values[0], 0
case 2:
return values[0], values[1]
}
return
return values[0], values[1]
}