about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/nix-setuid-helper/nix-setuid-helper.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-setuid-helper/nix-setuid-helper.cc b/src/nix-setuid-helper/nix-setuid-helper.cc
index 37347cd281c5..26c457fd93c3 100644
--- a/src/nix-setuid-helper/nix-setuid-helper.cc
+++ b/src/nix-setuid-helper/nix-setuid-helper.cc
@@ -36,7 +36,7 @@ static void secureChown(uid_t uidFrom, gid_t gidFrom,
            to. */
         throw Error(error);
 
-    if (uidFrom != -1) {
+    if (uidFrom != (uid_t) -1) {
         assert(uidFrom != 0);
         if (st.st_uid != uidFrom)
             throw Error(error);