From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:15 +0000 (-0700) Subject: lib/file: style fixes X-Git-Tag: stable-10.2.0~434 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4e0670e746b892da52ae7446e7fc526caf8be61;p=thirdparty%2Fopen-vm-tools.git lib/file: style fixes Some changes were against the style of lib/file. Fix this. --- diff --git a/open-vm-tools/lib/file/file.c b/open-vm-tools/lib/file/file.c index b05b5f2d6..169e11f07 100644 --- a/open-vm-tools/lib/file/file.c +++ b/open-vm-tools/lib/file/file.c @@ -1273,10 +1273,10 @@ File_MoveTree(const char *srcName, // IN: } else { struct stat statbuf; - if (-1 == Posix_Stat(dstName, &statbuf)) { + if (Posix_Stat(dstName, &statbuf) == -1) { int err = Err_Errno(); - if (ENOENT == err) { + if (err == ENOENT) { if (!File_CreateDirectoryHierarchy(dstName, NULL)) { Msg_Append(MSGID(File.MoveTree.dst.couldntCreate) "Could not create '%s'.\n\n", dstName); diff --git a/open-vm-tools/lib/file/fileTempPosix.c b/open-vm-tools/lib/file/fileTempPosix.c index 18ae6a1ca..dbbb1ccc7 100644 --- a/open-vm-tools/lib/file/fileTempPosix.c +++ b/open-vm-tools/lib/file/fileTempPosix.c @@ -282,7 +282,7 @@ FileAcceptableSafeTmpDir(const char *dirname, // IN: * effective user with permissions 'mode'. */ - if (0 == Posix_Lstat(dirname, &st)) { + if (Posix_Lstat(dirname, &st) == 0) { /* * Our directory inherited S_ISGID if its parent had it. So it * is important to ignore that bit, and it is safe to do so