mirror of https://github.com/docker/docs.git
Add comment about ignoring Sscanf error
Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)
This commit is contained in:
parent
cce099aa34
commit
dea3c2655d
|
@ -614,6 +614,8 @@ func ParseRelease(release string) (*KernelVersionInfo, error) {
|
||||||
flavor string
|
flavor string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Ignore error from Sscanf to allow an empty flavor. Instead, just
|
||||||
|
// make sure we got all the version numbers.
|
||||||
parsed, _ = fmt.Sscanf(release, "%d.%d.%d%s", &kernel, &major, &minor, &flavor)
|
parsed, _ = fmt.Sscanf(release, "%d.%d.%d%s", &kernel, &major, &minor, &flavor)
|
||||||
if parsed < 3 {
|
if parsed < 3 {
|
||||||
return nil, errors.New("Can't parse kernel version " + release)
|
return nil, errors.New("Can't parse kernel version " + release)
|
||||||
|
|
Loading…
Reference in New Issue