Clean up a comparison warning.
authorDavin McCall <davmac@davmac.org>
Tue, 20 Feb 2018 20:09:44 +0000 (20:09 +0000)
committerDavin McCall <davmac@davmac.org>
Tue, 20 Feb 2018 20:09:44 +0000 (20:09 +0000)
src/run-child-proc.cc

index 61b42d27c2859062f9ddf32d2db7aba909f0375f..f08ee5b41b6be17e998374e88d3a0a22d5b87d8a 100644 (file)
@@ -120,7 +120,7 @@ void service_record::run_child_proc(const char * const *args, const char *logfil
         tcsetpgrp(0, getpgrp());
     }
 
-    if (uid != -1) {
+    if (uid != uid_t(-1)) {
         if (setreuid(uid, uid) != 0) goto failure_out;
         if (setregid(gid, gid) != 0) goto failure_out;
     }