diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-06 21:11:49 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-02-06 21:11:49 +0100 |
commit | 0cd445f4d1ff322051ca2ad869e8757bb5ac2227 (patch) | |
tree | 1672fc0752bb1ed97a98b0c9824a9dad470a0b72 /coreutils | |
parent | 6aca76d4d770bf2a0c252bc54733c2dbb269fc43 (diff) | |
download | busybox-0cd445f4d1ff322051ca2ad869e8757bb5ac2227.tar.gz |
cosmetic fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/chown.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/coreutils/chown.c b/coreutils/chown.c index c6c1260ad..717e4b17a 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -62,8 +62,8 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, { #define param (*(struct param_t*)vparam) #define opt option_mask32 - uid_t u = (param.ugid.uid == (uid_t)-1) ? statbuf->st_uid : param.ugid.uid; - gid_t g = (param.ugid.gid == (gid_t)-1) ? statbuf->st_gid : param.ugid.gid; + uid_t u = (param.ugid.uid == (uid_t)-1L) ? statbuf->st_uid : param.ugid.uid; + gid_t g = (param.ugid.gid == (gid_t)-1L) ? statbuf->st_gid : param.ugid.gid; if (param.chown_func(fileName, u, g) == 0) { if (OPT_VERBOSE @@ -75,7 +75,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf, return TRUE; } if (!OPT_QUIET) - bb_simple_perror_msg(fileName); /* A filename can have % in it... */ + bb_simple_perror_msg(fileName); return FALSE; #undef opt #undef param @@ -87,8 +87,9 @@ int chown_main(int argc UNUSED_PARAM, char **argv) int opt, flags; struct param_t param; - param.ugid.uid = -1; - param.ugid.gid = -1; + /* Just -1 might not work: uid_t may be unsigned long */ + param.ugid.uid = -1L; + param.ugid.gid = -1L; #if ENABLE_FEATURE_CHOWN_LONG_OPTIONS applet_long_options = chown_longopts; |