]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
hostinfoPosix.c: Pick up some review comments
authorOliver Kurth <okurth@vmware.com>
Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)
committerOliver Kurth <okurth@vmware.com>
Wed, 7 Feb 2018 00:32:37 +0000 (16:32 -0800)
open-vm-tools/lib/misc/hostinfoPosix.c

index db78f6ec12b5139da9cc69276b6bcd95921f9203..495a0fafcfa146adc43f7fab281fd73b3c54602d 100644 (file)
@@ -1099,11 +1099,9 @@ static Bool
 HostinfoOsRelease(char *distro,       // OUT:
                   size_t distroSize)  // IN:
 {
-   Bool success;
-
-   success = HostinfoReadDistroFile("/etc/os-release",
-                                    &osReleaseFields[0],
-                                    distroSize, distro);
+   Bool success = HostinfoReadDistroFile("/etc/os-release",
+                                         &osReleaseFields[0],
+                                         distroSize, distro);
 
    if (!success) {
       success = HostinfoReadDistroFile("/usr/lib/os-release",
@@ -1120,7 +1118,7 @@ HostinfoOsRelease(char *distro,       // OUT:
  *
  * HostinfoLsb --
  *
- *      Attempt to determine the disto string via the LSB standard.
+ *      Attempt to determine the distro string via the LSB standard.
  *
  * Return value:
  *      TRUE   Success
@@ -1144,6 +1142,7 @@ HostinfoLsb(char *distro,       // OUT:
     */
 
    lsbOutput = HostinfoGetCmdOutput("/usr/bin/lsb_release -sd 2>/dev/null");
+
    if (lsbOutput == NULL) {
       int i;
 
@@ -1296,7 +1295,6 @@ HostinfoLinux(struct utsname *buf)  // IN:
    }
 
    /* Not LSB or os-release compliant. Report something generic. */
-
    HostinfoDefaultLinux(distro, sizeof distro,
                         distroShort, sizeof distroShort);