summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-16 13:07:40 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-16 18:55:08 +0200
commit2e009c2f45dca5d8070653042c05c17aa4d0d692 (patch)
treee71b18a04d43452f18214a0bb34b9da9efe80c76
parent4ece292c3fba7ec8f02b057a069943a325d091db (diff)
trans/fakeroot: fix comparison between signed and unsigned
* trans/fakeroot.c (netfs_attempt_chown): Fix comparison between signed and unsigned integer expressions.
-rw-r--r--trans/fakeroot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 0ea3cbf4..3107e29f 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;