]> xenbits.xensource.com Git - libvirt.git/commitdiff
virfile: Remove redundant #ifndef
authorTim Wiederhake <twiederh@redhat.com>
Mon, 1 Feb 2021 12:41:58 +0000 (13:41 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Feb 2021 14:00:55 +0000 (15:00 +0100)
This section is guarded by "#ifndef WIN32" in line 2109--2808.

Found by clang-tidy's "readability-redundant-preprocessor" check.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/util/virfile.c

index e8713613e353f0513d75dcc26a2fcf805308b06c..e07f3d6b9c90b2e2124aaac74bfe11e5665eca4e 100644 (file)
@@ -2643,7 +2643,7 @@ virDirCreateNoFork(const char *path,
         virReportSystemError(errno, _("stat of '%s' failed"), path);
         goto error;
     }
-# ifndef WIN32
+
     if (((uid != (uid_t) -1 && st.st_uid != uid) ||
          (gid != (gid_t) -1 && st.st_gid != gid))
         && (chown(path, uid, gid) < 0)) {
@@ -2652,7 +2652,7 @@ virDirCreateNoFork(const char *path,
                              path, (unsigned int) uid, (unsigned int) gid);
         goto error;
     }
-# endif /* !WIN32 */
+
     if (mode != (mode_t) -1 && chmod(path, mode) < 0) {
         ret = -errno;
         virReportSystemError(errno,