bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/4] trans/fakeroot: fix comparison between signed and unsigned


From: Justus Winter
Subject: [PATCH 2/4] trans/fakeroot: fix comparison between signed and unsigned
Date: Fri, 16 May 2014 18:56:25 +0200

* trans/fakeroot.c (netfs_attempt_chown): Fix comparison between
signed and unsigned integer expressions.
---
 trans/fakeroot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 0ea3cbf..3107e29 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -483,12 +483,12 @@ error_t
 netfs_attempt_chown (struct iouser *cred, struct node *np,
                     uid_t uid, uid_t gid)
 {
-  if (uid != -1)
+  if (uid != ~0U)
     {
       set_faked_attribute (np, FAKE_UID);
       np->nn_stat.st_uid = uid;
     }
-  if (gid != -1)
+  if (gid != ~0U)
     {
       set_faked_attribute (np, FAKE_GID);
       np->nn_stat.st_gid = gid;
-- 
2.0.0.rc0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]