Browse code

Add comment about ignoring Sscanf error

Docker-DCO-1.1-Signed-off-by: Charles Lindsay <chaz@chazomatic.us> (github: chazomaticus)

Charles Lindsay authored on 2014/01/23 02:32:50
Showing 1 changed files
... ...
@@ -614,6 +614,8 @@ func ParseRelease(release string) (*KernelVersionInfo, error) {
614 614
 		flavor                       string
615 615
 	)
616 616
 
617
+	// Ignore error from Sscanf to allow an empty flavor.  Instead, just
618
+	// make sure we got all the version numbers.
617 619
 	parsed, _ = fmt.Sscanf(release, "%d.%d.%d%s", &kernel, &major, &minor, &flavor)
618 620
 	if parsed < 3 {
619 621
 		return nil, errors.New("Can't parse kernel version " + release)