aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-06 21:11:49 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-06 21:11:49 +0100
commit0cd445f4d1ff322051ca2ad869e8757bb5ac2227 (patch)
tree1672fc0752bb1ed97a98b0c9824a9dad470a0b72 /coreutils
parent6aca76d4d770bf2a0c252bc54733c2dbb269fc43 (diff)
downloadbusybox-w32-0cd445f4d1ff322051ca2ad869e8757bb5ac2227.tar.gz
busybox-w32-0cd445f4d1ff322051ca2ad869e8757bb5ac2227.tar.bz2
busybox-w32-0cd445f4d1ff322051ca2ad869e8757bb5ac2227.zip
cosmetic fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/chown.c11
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,
62{ 62{
63#define param (*(struct param_t*)vparam) 63#define param (*(struct param_t*)vparam)
64#define opt option_mask32 64#define opt option_mask32
65 uid_t u = (param.ugid.uid == (uid_t)-1) ? statbuf->st_uid : param.ugid.uid; 65 uid_t u = (param.ugid.uid == (uid_t)-1L) ? statbuf->st_uid : param.ugid.uid;
66 gid_t g = (param.ugid.gid == (gid_t)-1) ? statbuf->st_gid : param.ugid.gid; 66 gid_t g = (param.ugid.gid == (gid_t)-1L) ? statbuf->st_gid : param.ugid.gid;
67 67
68 if (param.chown_func(fileName, u, g) == 0) { 68 if (param.chown_func(fileName, u, g) == 0) {
69 if (OPT_VERBOSE 69 if (OPT_VERBOSE
@@ -75,7 +75,7 @@ static int FAST_FUNC fileAction(const char *fileName, struct stat *statbuf,
75 return TRUE; 75 return TRUE;
76 } 76 }
77 if (!OPT_QUIET) 77 if (!OPT_QUIET)
78 bb_simple_perror_msg(fileName); /* A filename can have % in it... */ 78 bb_simple_perror_msg(fileName);
79 return FALSE; 79 return FALSE;
80#undef opt 80#undef opt
81#undef param 81#undef param
@@ -87,8 +87,9 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
87 int opt, flags; 87 int opt, flags;
88 struct param_t param; 88 struct param_t param;
89 89
90 param.ugid.uid = -1; 90 /* Just -1 might not work: uid_t may be unsigned long */
91 param.ugid.gid = -1; 91 param.ugid.uid = -1L;
92 param.ugid.gid = -1L;
92 93
93#if ENABLE_FEATURE_CHOWN_LONG_OPTIONS 94#if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
94 applet_long_options = chown_longopts; 95 applet_long_options = chown_longopts;