From: Oliver Kurth Date: Wed, 7 Mar 2018 23:35:47 +0000 (-0800) Subject: Fix a typo in the sscanf format string for Amazon Linux X-Git-Tag: 10.2.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=799b14b030f2c54d1b2a7e59788bc64b86e5cec4;p=thirdparty%2Fopen-vm-tools.git Fix a typo in the sscanf format string for Amazon Linux --- diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index bf1ef4723..388871d96 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -751,14 +751,11 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name } else if (strstr(distroLower, "sun")) { Str_Strcpy(distroShort, STR_OS_SUN_DESK, distroShortSize); } else if (strstr(distroLower, "amazon")) { - int amazonMinor = 0; int amazonMajor = 0; - if (sscanf(distroLower, "Amazon Linux %d.%d", &amazonMajor, - &amazonMinor) != 2) { + if (sscanf(distroLower, "amazon linux %d", &amazonMajor) != 1) { /* Oldest known good release */ amazonMajor = 2; - amazonMinor = 0; } Str_Sprintf(distroShort, distroShortSize, "%s%d", STR_OS_AMAZON,