random style fixes

This commit is contained in:
Denis Vlasenko 2006-10-03 19:02:20 +00:00
parent 6edaddec02
commit cf94446af7
4 changed files with 20 additions and 18 deletions

View File

@ -303,7 +303,7 @@ static void fileaction_setowngrp(char *filename, int fileref)
int uid, gid;
uid = bb_xgetpwnam(rpm_getstring(RPMTAG_FILEUSERNAME, fileref));
gid = bb_xgetgrnam(rpm_getstring(RPMTAG_FILEGROUPNAME, fileref));
chown (filename, uid, gid);
chown(filename, uid, gid);
}
static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref))

View File

@ -163,7 +163,6 @@ extern int recursive_action(const char *fileName, int recurse,
void* userData);
extern int bb_parse_mode( const char* s, mode_t* theMode);
extern long bb_xgetlarg(const char *arg, int base, long lower, long upper);
extern unsigned int tty_baud_to_value(speed_t speed);
extern speed_t tty_value_to_baud(unsigned int value);
@ -258,21 +257,24 @@ struct suffix_mult {
};
extern unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base,
unsigned long lower,
unsigned long upper,
const struct suffix_mult *suffixes);
unsigned long lower,
unsigned long upper,
const struct suffix_mult *suffixes);
extern unsigned long bb_xgetularg_bnd(const char *arg, int base,
unsigned long lower,
unsigned long upper);
unsigned long lower,
unsigned long upper);
extern unsigned long bb_xgetularg10_bnd(const char *arg,
unsigned long lower,
unsigned long upper);
unsigned long lower,
unsigned long upper);
extern unsigned long bb_xgetularg10(const char *arg);
extern long bb_xgetlarg(const char *arg, int base,
long lower,
long upper);
extern long bb_xgetlarg_bnd_sfx(const char *arg, int base,
long lower,
long upper,
const struct suffix_mult *suffixes);
long lower,
long upper,
const struct suffix_mult *suffixes);
extern long bb_xgetlarg10_sfx(const char *arg, const struct suffix_mult *suffixes);
@ -285,9 +287,9 @@ extern unsigned long bb_xparse_number(const char *numstr,
* increases target size and is often not needed on embedded systems. */
extern long bb_xgetpwnam(const char *name);
extern long bb_xgetgrnam(const char *name);
extern char * bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix);
extern char * bb_getpwuid(char *name, long uid, int bufsize);
extern char * bb_getgrgid(char *group, long gid, int bufsize);
extern char *bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix);
extern char *bb_getpwuid(char *name, long uid, int bufsize);
extern char *bb_getgrgid(char *group, long gid, int bufsize);
extern char *bb_askpass(int timeout, const char * prompt);
extern int device_open(const char *device, int mode);

View File

@ -34,7 +34,7 @@ char * bb_getgrgid(char *group, long gid, int bufsize)
{
struct group *mygroup = getgrgid(gid);
return bb_getug(group, (mygroup) ?
return bb_getug(group, (mygroup) ?
mygroup->gr_name : (char *)mygroup, gid, bufsize, 'g');
}
#endif /* L_bb_getgrgid */

View File

@ -15,7 +15,7 @@
#include "libbb.h"
unsigned long bb_xparse_number(const char *numstr,
const struct suffix_mult *suffixes)
const struct suffix_mult *suffixes)
{
unsigned long int r;
char *e;
@ -46,5 +46,5 @@ unsigned long bb_xparse_number(const char *numstr,
} while (suffixes->suffix);
}
}
bb_error_msg_and_die("invalid number `%s'", numstr);
bb_error_msg_and_die("invalid number '%s'", numstr);
}