From: Oliver Kurth Date: Thu, 5 Dec 2019 19:34:41 +0000 (-0800) Subject: Clean up some code in hostinfo. X-Git-Tag: stable-11.1.0~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ee97f9eacb8d2794b74f0dc4f7f38eee447d40b;p=thirdparty%2Fopen-vm-tools.git Clean up some code in hostinfo. Remove duplicate declarations in hostinfo.h Re-indent some lines in hostinfoPosix.c --- diff --git a/open-vm-tools/lib/include/hostinfo.h b/open-vm-tools/lib/include/hostinfo.h index bc42f464f..cc85a0c66 100644 --- a/open-vm-tools/lib/include/hostinfo.h +++ b/open-vm-tools/lib/include/hostinfo.h @@ -122,9 +122,6 @@ int Hostinfo_OSVersion(unsigned int i); int Hostinfo_GetSystemBitness(void); const char *Hostinfo_OSVersionString(void); -char *Hostinfo_GetOSName(void); -char *Hostinfo_GetOSGuestString(void); - #if defined(_WIN32) Bool Hostinfo_OSIsWinNT(void); Bool Hostinfo_OSIsWow64(void); diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index 941bc053a..0ef33b03a 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -3207,16 +3207,16 @@ Hostinfo_Execute(const char *path, // IN: if (wait) { for (;;) { - if (waitpid(pid, &status, 0) == -1) { - if (errno == ECHILD) { - return 0; // This sucks. We really don't know. - } - if (errno != EINTR) { - return -1; - } - } else { - return status; - } + if (waitpid(pid, &status, 0) == -1) { + if (errno == ECHILD) { + return 0; // This sucks. We really don't know. + } + if (errno != EINTR) { + return -1; + } + } else { + return status; + } } } else { return 0;