summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2023-05-04 18:04:55 +0000
committermartin <martin@NetBSD.org>2023-05-04 18:04:55 +0000
commitf32d263cc688fd0e712c2a9f448acc4b835d34f8 (patch)
tree861e2e7802f16dd568efeba7350d51f1a96f3ed9 /sbin
parent976dee0a9f9389591a5ca3d6669da55c93085252 (diff)
Cast -1 to expected type and fix a edititing mishap to make this build.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/chown/chown.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/chown/chown.c b/sbin/chown/chown.c
index f5bba124b51..834462ce70f 100644
--- a/sbin/chown/chown.c
+++ b/sbin/chown/chown.c
@@ -1,4 +1,4 @@
-/* $NetBSD: chown.c,v 1.10 2023/05/04 17:07:56 pgoyette Exp $ */
+/* $NetBSD: chown.c,v 1.11 2023/05/04 18:04:55 martin Exp $ */
/*
* Copyright (c) 1988, 1993, 1994, 2003
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994, 2003\
#if 0
static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94";
#else
-__RCSID("$NetBSD: chown.c,v 1.10 2023/05/04 17:07:56 pgoyette Exp $");
+__RCSID("$NetBSD: chown.c,v 1.11 2023/05/04 18:04:55 martin Exp $");
#endif
#endif /* not lint */
@@ -242,9 +242,9 @@ main(int argc, char **argv)
* attempt to update.
*/
if (dflag &&
- ( -1 == uid || p->fts_statp->st_uid == uid ) &&
- ( -1 == gid || p->fts_statp->st_gid == gid ) &&
- ( p->fts_statp->st_mode & 07000 ) == 0))
+ ( (uid_t)-1 == uid || p->fts_statp->st_uid == uid ) &&
+ ( (gid_t)-1 == gid || p->fts_statp->st_gid == gid ) &&
+ ( p->fts_statp->st_mode & 07000 ) == 0)
continue;
if ((*change_owner)(p->fts_accpath, uid, gid) && !fflag) {