]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
lib/file: style fixes
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:15 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:15 +0000 (11:23 -0700)
Some changes were against the style of lib/file. Fix this.

open-vm-tools/lib/file/file.c
open-vm-tools/lib/file/fileTempPosix.c

index b05b5f2d670061b4e412637bbb49202a753f428e..169e11f07d1a63ac721ee4b350175919775a6d5b 100644 (file)
@@ -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);
index 18ae6a1cab1373e1a58102600e4e6c499cc85ec9..dbbb1ccc7b3d2993dd7fd3d21807d024f465e136 100644 (file)
@@ -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