mirror of
https://git.busybox.net/busybox.git
synced 2024-11-24 14:13:26 +08:00
style fix (stray space before ';')
This commit is contained in:
parent
82bd9ee645
commit
b71c668c57
@ -43,7 +43,7 @@ if [ "$cleanup" = "1" ] && [ -e "$prefix/bin/busybox" ]; then
|
||||
inode=`ls -i "$prefix/bin/busybox" | awk '{print $1}'`
|
||||
sub_shell_it=`
|
||||
cd "$prefix"
|
||||
for d in usr/sbin usr/bin sbin bin ; do
|
||||
for d in usr/sbin usr/bin sbin bin; do
|
||||
pd=$PWD
|
||||
if [ -d "$d" ]; then
|
||||
cd $d
|
||||
@ -58,7 +58,7 @@ rm -f $prefix/bin/busybox || exit 1
|
||||
mkdir -p $prefix/bin || exit 1
|
||||
install -m 755 busybox $prefix/bin/busybox || exit 1
|
||||
|
||||
for i in $h ; do
|
||||
for i in $h; do
|
||||
appdir=`dirname $i`
|
||||
mkdir -p $prefix/$appdir || exit 1
|
||||
if [ "$2" = "--hardlinks" ]; then
|
||||
|
@ -712,7 +712,7 @@ static void set_status(const unsigned status_node_num, const char *new_value, co
|
||||
|
||||
static const char *describe_status(int status_num)
|
||||
{
|
||||
int status_want, status_state ;
|
||||
int status_want, status_state;
|
||||
if (status_hashtable[status_num] == NULL || status_hashtable[status_num]->status == 0)
|
||||
return "is not installed or flagged to be installed";
|
||||
|
||||
|
@ -49,10 +49,10 @@ aa: 85.1% -- replaced with aa.gz
|
||||
#ifdef DEBUG
|
||||
# define Assert(cond,msg) { if (!(cond)) bb_error_msg(msg); }
|
||||
# define Trace(x) fprintf x
|
||||
# define Tracev(x) {if (verbose) fprintf x ;}
|
||||
# define Tracevv(x) {if (verbose > 1) fprintf x ;}
|
||||
# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
|
||||
# define Tracecv(c,x) {if (verbose > 1 && (c)) fprintf x ;}
|
||||
# define Tracev(x) {if (verbose) fprintf x; }
|
||||
# define Tracevv(x) {if (verbose > 1) fprintf x; }
|
||||
# define Tracec(c,x) {if (verbose && (c)) fprintf x; }
|
||||
# define Tracecv(c,x) {if (verbose > 1 && (c)) fprintf x; }
|
||||
#else
|
||||
# define Assert(cond,msg)
|
||||
# define Trace(x)
|
||||
|
@ -122,13 +122,13 @@ char get_header_tar(archive_handle_t *archive_handle)
|
||||
sum_s = ' ' * sizeof(tar.chksum);
|
||||
#endif
|
||||
sum_u = ' ' * sizeof(tar.chksum);
|
||||
for (i = 0; i < 148 ; i++) {
|
||||
for (i = 0; i < 148; i++) {
|
||||
sum_u += ((unsigned char*)&tar)[i];
|
||||
#if ENABLE_FEATURE_TAR_OLDSUN_COMPATIBILITY
|
||||
sum_s += ((signed char*)&tar)[i];
|
||||
#endif
|
||||
}
|
||||
for (i = 156; i < 512 ; i++) {
|
||||
for (i = 156; i < 512; i++) {
|
||||
sum_u += ((unsigned char*)&tar)[i];
|
||||
#if ENABLE_FEATURE_TAR_OLDSUN_COMPATIBILITY
|
||||
sum_s += ((signed char*)&tar)[i];
|
||||
|
@ -36,7 +36,7 @@
|
||||
* (adapted from example in gnu wc.c)
|
||||
*
|
||||
* echo hello > /tmp/testfile &&
|
||||
* (dd ibs=1k skip=1 count=0 &> /dev/null ; wc -c) < /tmp/testfile
|
||||
* (dd ibs=1k skip=1 count=0 &> /dev/null; wc -c) < /tmp/testfile
|
||||
*
|
||||
* for which 'wc -c' should output '0'.
|
||||
*/
|
||||
|
@ -101,7 +101,7 @@ static int decode_arg(char *arg)
|
||||
} else
|
||||
return EOF;
|
||||
|
||||
for (; *arg ; ++arg)
|
||||
for (; *arg; ++arg)
|
||||
(*fl) |= get_flag(*arg);
|
||||
|
||||
return 1;
|
||||
|
@ -4701,7 +4701,7 @@ static void add_dupe(e2fsck_t ctx, ext2_ino_t ino, blk_t blk,
|
||||
else {
|
||||
di = (struct dup_inode *) e2fsck_allocate_memory(ctx,
|
||||
sizeof(struct dup_inode), "duplicate inode header");
|
||||
di->dir = (ino == EXT2_ROOT_INO) ? EXT2_ROOT_INO : 0 ;
|
||||
di->dir = (ino == EXT2_ROOT_INO) ? EXT2_ROOT_INO : 0;
|
||||
di->num_dupblocks = 0;
|
||||
di->block_list = 0;
|
||||
di->inode = *inode;
|
||||
@ -12490,7 +12490,7 @@ blk_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name,
|
||||
sb = (struct ext2_super_block *) buf;
|
||||
|
||||
for (blocksize = EXT2_MIN_BLOCK_SIZE;
|
||||
blocksize <= EXT2_MAX_BLOCK_SIZE ; blocksize *= 2) {
|
||||
blocksize <= EXT2_MAX_BLOCK_SIZE; blocksize *= 2) {
|
||||
superblock = blocksize*8;
|
||||
if (blocksize == 1024)
|
||||
superblock++;
|
||||
|
@ -223,7 +223,7 @@ int ext2fs_u32_list_del(ext2_u32_list bb, __u32 blk)
|
||||
if (remloc < 0)
|
||||
return -1;
|
||||
|
||||
for (i = remloc ; i < bb->num-1; i++)
|
||||
for (i = remloc; i < bb->num - 1; i++)
|
||||
bb->list[i] = bb->list[i+1];
|
||||
bb->num--;
|
||||
return 0;
|
||||
|
@ -343,7 +343,7 @@ errcode_t ext2fs_block_iterate2(ext2_filsys fs,
|
||||
/*
|
||||
* Iterate over normal data blocks
|
||||
*/
|
||||
for (i = 0; i < EXT2_NDIR_BLOCKS ; i++, ctx.bcount++) {
|
||||
for (i = 0; i < EXT2_NDIR_BLOCKS; i++, ctx.bcount++) {
|
||||
if (blocks[i] || (flags & BLOCK_FLAG_APPEND)) {
|
||||
ret |= (*ctx.func)(fs, &blocks[i],
|
||||
ctx.bcount, 0, i, priv_data);
|
||||
|
@ -228,7 +228,7 @@ errcode_t ext2fs_file_read(ext2_file_t file, void *buf,
|
||||
c = fs->blocksize - start;
|
||||
if (c > wanted)
|
||||
c = wanted;
|
||||
left = EXT2_I_SIZE(&file->inode) - file->pos ;
|
||||
left = EXT2_I_SIZE(&file->inode) - file->pos;
|
||||
if (c > left)
|
||||
c = left;
|
||||
|
||||
|
@ -273,7 +273,7 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
|
||||
group_block = fs->super->s_first_data_block;
|
||||
dest = (char *) fs->group_desc;
|
||||
groups_per_block = fs->blocksize / sizeof(struct ext2_group_desc);
|
||||
for (i=0 ; i < fs->desc_blocks; i++) {
|
||||
for (i = 0; i < fs->desc_blocks; i++) {
|
||||
blk = ext2fs_descriptor_block_loc(fs, group_block, i);
|
||||
retval = io_channel_read_blk(fs->io, blk, 1, dest);
|
||||
if (retval)
|
||||
|
@ -1357,7 +1357,7 @@ int fsck_main(int argc, char **argv)
|
||||
interactive++;
|
||||
return check_all();
|
||||
}
|
||||
for (i = 0 ; i < num_devices; i++) {
|
||||
for (i = 0; i < num_devices; i++) {
|
||||
if (cancel_requested) {
|
||||
if (!kill_sent) {
|
||||
kill_all(SIGTERM);
|
||||
|
@ -59,14 +59,14 @@ static char *creator_os;
|
||||
static char *volume_label;
|
||||
static char *mount_dir;
|
||||
static char *journal_device = NULL;
|
||||
static int sync_kludge; /* Set using the MKE2FS_SYNC env. option */
|
||||
static int sync_kludge; /* Set using the MKE2FS_SYNC env. option */
|
||||
|
||||
static int sys_page_size = 4096;
|
||||
static int linux_version_code = 0;
|
||||
|
||||
static int int_log2(int arg)
|
||||
{
|
||||
int l = 0;
|
||||
int l = 0;
|
||||
|
||||
arg >>= 1;
|
||||
while (arg) {
|
||||
@ -80,7 +80,7 @@ static int int_log10(unsigned int arg)
|
||||
{
|
||||
int l;
|
||||
|
||||
for (l=0; arg ; l++)
|
||||
for (l = 0; arg; l++)
|
||||
arg = arg / 10;
|
||||
return l;
|
||||
}
|
||||
@ -1226,7 +1226,7 @@ int mke2fs_main (int argc, char **argv)
|
||||
* don't check all the filesystems at the same time. We use a
|
||||
* kludgy hack of using the UUID to derive a random jitter value.
|
||||
*/
|
||||
for (i = 0, val = 0 ; i < sizeof(fs->super->s_uuid); i++)
|
||||
for (i = 0, val = 0; i < sizeof(fs->super->s_uuid); i++)
|
||||
val += fs->super->s_uuid[i];
|
||||
fs->super->s_max_mnt_count += val % EXT2_DFL_MAX_MNT_COUNT;
|
||||
|
||||
|
@ -328,11 +328,11 @@ static void prune(void)
|
||||
|
||||
for (pref = 0; pref < len[0] && pref < len[1] &&
|
||||
file[0][pref + 1].value == file[1][pref + 1].value; pref++)
|
||||
;
|
||||
continue;
|
||||
for (suff = 0; suff < len[0] - pref && suff < len[1] - pref &&
|
||||
file[0][len[0] - suff].value == file[1][len[1] - suff].value;
|
||||
suff++)
|
||||
;
|
||||
continue;
|
||||
for (j = 0; j < 2; j++) {
|
||||
sfile[j] = file[j] + pref;
|
||||
slen[j] = len[j] - pref - suff;
|
||||
|
@ -2800,7 +2800,7 @@ static void refresh(int full_screen)
|
||||
format_line(buf, tp, li);
|
||||
|
||||
// skip to the end of the current text[] line
|
||||
while (tp < end && *tp++ != '\n') /*no-op*/ ;
|
||||
while (tp < end && *tp++ != '\n') /*no-op*/;
|
||||
|
||||
// see if there are any changes between vitual screen and buf
|
||||
changed = FALSE; // assume no change
|
||||
|
@ -417,7 +417,7 @@
|
||||
" -m show min and max priorities"
|
||||
|
||||
#define chrt_example_usage \
|
||||
"$ chrt -r 4 sleep 900 ; x=$!\n" \
|
||||
"$ chrt -r 4 sleep 900; x=$!\n" \
|
||||
"$ chrt -f -p 3 $x\n" \
|
||||
"You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
|
||||
|
||||
@ -1105,19 +1105,19 @@
|
||||
"#!/bin/sh\n" \
|
||||
"GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
|
||||
" -n 'example.busybox' -- \"$@\"`\n" \
|
||||
"if [ $? != 0 ] ; then exit 1 ; fi\n" \
|
||||
"if [ $? != 0 ]; then exit 1; fi\n" \
|
||||
"eval set -- \"$GETOPT\"\n" \
|
||||
"while true ; do\n" \
|
||||
"while true; do\n" \
|
||||
" case $1 in\n" \
|
||||
" -a|--a-long) echo \"Option a\" ; shift ;;\n" \
|
||||
" -b|--b-long) echo \"Option b, argument '$2'\" ; shift 2 ;;\n" \
|
||||
" -a|--a-long) echo \"Option a\"; shift;;\n" \
|
||||
" -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \
|
||||
" -c|--c-long)\n" \
|
||||
" case \"$2\" in\n" \
|
||||
" \"\") echo \"Option c, no argument\"; shift 2 ;;\n" \
|
||||
" *) echo \"Option c, argument '$2'\" ; shift 2 ;;\n" \
|
||||
" esac ;;\n" \
|
||||
" --) shift ; break ;;\n" \
|
||||
" *) echo \"Internal error!\" ; exit 1 ;;\n" \
|
||||
" \"\") echo \"Option c, no argument\"; shift 2;;\n" \
|
||||
" *) echo \"Option c, argument '$2'\"; shift 2;;\n" \
|
||||
" esac;;\n" \
|
||||
" --) shift; break;;\n" \
|
||||
" *) echo \"Internal error!\"; exit 1;;\n" \
|
||||
" esac\n" \
|
||||
"done\n"
|
||||
|
||||
@ -2867,10 +2867,10 @@ USE_FEATURE_RUN_PARTS_FANCY("\n -l Prints names of all matching files even when
|
||||
"$ run-parts -a stop=now /etc/init.d\n\n" \
|
||||
"Let's assume you have a script foo/dosomething:\n" \
|
||||
"#!/bin/sh\n" \
|
||||
"for i in $*; do eval $i; done ; unset i\n" \
|
||||
"for i in $*; do eval $i; done; unset i\n" \
|
||||
"case \"$1\" in\n" \
|
||||
"start*) echo starting something ;;\n" \
|
||||
"stop*) set -x ; shutdown -h $stop ;;\n" \
|
||||
"start*) echo starting something;;\n" \
|
||||
"stop*) set -x; shutdown -h $stop;;\n" \
|
||||
"esac\n\n" \
|
||||
"Running this yields:\n" \
|
||||
"$run-parts -a stop=+4m foo/\n" \
|
||||
|
@ -18,7 +18,7 @@ unsigned type xato##UT##_range_sfx(const char *str, unsigned type l, unsigned ty
|
||||
unsigned type xato##UT##_range(const char *str, unsigned type l, unsigned type u); \
|
||||
unsigned type xato##UT##_sfx(const char *str, const struct suffix_mult *sfx); \
|
||||
unsigned type xato##UT(const char *str); \
|
||||
type xstrto##T##_range_sfx(const char *str, int b, type l, type u, const struct suffix_mult *sfx) ;\
|
||||
type xstrto##T##_range_sfx(const char *str, int b, type l, type u, const struct suffix_mult *sfx); \
|
||||
type xstrto##T##_range(const char *str, int b, type l, type u); \
|
||||
type xato##T##_range_sfx(const char *str, type l, type u, const struct suffix_mult *sfx); \
|
||||
type xato##T##_range(const char *str, type l, type u); \
|
||||
|
@ -75,7 +75,7 @@ const char *make_human_readable_str(unsigned long long size,
|
||||
if (frac >= 5) {
|
||||
++val;
|
||||
}
|
||||
f = "%llu%*c" /* fmt_no_tenths */ ;
|
||||
f = "%llu%*c" /* fmt_no_tenths */;
|
||||
frac = 1;
|
||||
}
|
||||
#endif
|
||||
|
@ -94,7 +94,7 @@ int main(void)
|
||||
unsigned long v;
|
||||
speed_t s;
|
||||
|
||||
for (v = 0 ; v < 500000 ; v++) {
|
||||
for (v = 0 ; v < 500000; v++) {
|
||||
s = tty_value_to_baud(v);
|
||||
if (s == (speed_t) -1) {
|
||||
continue;
|
||||
@ -104,7 +104,7 @@ int main(void)
|
||||
|
||||
printf("-------------------------------\n");
|
||||
|
||||
for (s = 0 ; s < 010017+1 ; s++) {
|
||||
for (s = 0 ; s < 010017+1; s++) {
|
||||
v = tty_baud_to_value(s);
|
||||
if (!v) {
|
||||
continue;
|
||||
|
@ -642,7 +642,7 @@ int initgroups(const char *user, gid_t gid)
|
||||
while (!bb__pgsreader(bb__parsegrent, &group, buff, sizeof(buff), grfile)) {
|
||||
assert(group.gr_mem); /* Must have at least a NULL terminator. */
|
||||
if (group.gr_gid != gid) {
|
||||
for (m=group.gr_mem ; *m ; m++) {
|
||||
for (m = group.gr_mem; *m; m++) {
|
||||
if (!strcmp(*m, user)) {
|
||||
if (!(num_groups & 7)) {
|
||||
gid_t *tmp = (gid_t *)
|
||||
@ -759,7 +759,7 @@ int putspent(const struct spwd *p, FILE *stream)
|
||||
goto DO_UNLOCK;
|
||||
}
|
||||
|
||||
for (i=0 ; i < sizeof(_sp_off) ; i++) {
|
||||
for (i = 0; i < sizeof(_sp_off); i++) {
|
||||
f = ld_format;
|
||||
x = *(const long *)(((const char *) p) + _sp_off[i]);
|
||||
if (x == -1) {
|
||||
|
@ -1600,7 +1600,7 @@ int st_expr_expand(char *output, unsigned int length, const char *input,
|
||||
}
|
||||
/* Someone else's home directory */
|
||||
for (ptr = ++input; !isspace(ch) && (ch != '/') && (ch != '\0'); ch = *++ptr)
|
||||
/* VOID */ ;
|
||||
/* VOID */;
|
||||
len = ptr - input;
|
||||
if (len >= sizeof tmp)
|
||||
goto st_expr_expand_out;
|
||||
@ -1679,7 +1679,7 @@ static const char *expand_variable(char *buffer, unsigned int length,
|
||||
if (ch != '{') {
|
||||
/* Simple variable expansion */
|
||||
for (ptr = input; isalnum(ch) || (ch == '_') || (ch == ':'); ch = *++ptr)
|
||||
/* VOID */ ;
|
||||
/* VOID */;
|
||||
len = ptr - input;
|
||||
if ((size_t)len >= sizeof tmp)
|
||||
goto expand_variable_out;
|
||||
|
@ -803,7 +803,7 @@ static const struct hwtype sit_hwtype = {
|
||||
.type = ARPHRD_SIT,
|
||||
.print = UNSPEC_print,
|
||||
.suppress_null_addr = 1
|
||||
} ;
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct hwtype *const hwtypes[] = {
|
||||
|
@ -82,7 +82,7 @@ void ip_parse_common_args(int *argcp, char ***argvp)
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
_SL_ = oneline ? '\\' : '\n' ;
|
||||
_SL_ = oneline ? '\\' : '\n';
|
||||
*argcp = argc;
|
||||
*argvp = argv;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
|
||||
fprintf(fp, "<");
|
||||
flags &= ~IFF_RUNNING;
|
||||
#define _PF(f) if (flags&IFF_##f) { \
|
||||
flags &= ~IFF_##f ; \
|
||||
flags &= ~IFF_##f; \
|
||||
fprintf(fp, #f "%s", flags ? "," : ""); }
|
||||
_PF(LOOPBACK);
|
||||
_PF(BROADCAST);
|
||||
|
@ -11268,7 +11268,7 @@ helpcmd(int argc, char **argv)
|
||||
int col, i;
|
||||
|
||||
out1fmt("\nBuilt-in commands:\n-------------------\n");
|
||||
for (col = 0, i = 0; i < ARRAY_SIZE(builtintab) ; i++) {
|
||||
for (col = 0, i = 0; i < ARRAY_SIZE(builtintab); i++) {
|
||||
col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '),
|
||||
builtintab[i].name + 1);
|
||||
if (col > 60) {
|
||||
|
@ -1823,7 +1823,7 @@ wrong_p_order(int *prev)
|
||||
ullong last_p_start_pos = 0, p_start_pos;
|
||||
int i, last_i = 0;
|
||||
|
||||
for (i = 0 ; i < partitions; i++) {
|
||||
for (i = 0; i < partitions; i++) {
|
||||
if (i == 4) {
|
||||
last_i = 4;
|
||||
last_p_start_pos = 0;
|
||||
@ -2041,7 +2041,7 @@ x_list_table(int extend)
|
||||
printf("\nDisk %s: %d heads, %d sectors, %d cylinders\n\n",
|
||||
disk_device, heads, sectors, cylinders);
|
||||
printf("Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID\n");
|
||||
for (i = 0 ; i < partitions; i++) {
|
||||
for (i = 0; i < partitions; i++) {
|
||||
pe = &ptes[i];
|
||||
p = (extend ? pe->ext_pointer : pe->part_table);
|
||||
if (p != NULL) {
|
||||
|
@ -142,7 +142,7 @@ static void
|
||||
add2freelist(unsigned int f, unsigned int l)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 17 ; i++)
|
||||
for (i = 0; i < 17; i++)
|
||||
if (freelist[i].last == 0)
|
||||
break;
|
||||
setfreelist(i, f, l);
|
||||
@ -153,7 +153,7 @@ clearfreelist(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 17 ; i++)
|
||||
for (i = 0; i < 17; i++)
|
||||
setfreelist(i, 0, 0);
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ isinfreelist(unsigned int b)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 17 ; i++)
|
||||
for (i = 0; i < 17; i++)
|
||||
if (freelist[i].first <= b && freelist[i].last >= b)
|
||||
return freelist[i].last;
|
||||
return 0;
|
||||
@ -317,7 +317,7 @@ sgi_list_table(int xtra)
|
||||
printf("----- partitions -----\n"
|
||||
"Pt# %*s Info Start End Sectors Id System\n",
|
||||
w + 2, "Device");
|
||||
for (i = 0 ; i < partitions; i++) {
|
||||
for (i = 0; i < partitions; i++) {
|
||||
if (sgi_get_num_sectors(i) || debug ) {
|
||||
uint32_t start = sgi_get_start_sector(i);
|
||||
uint32_t len = sgi_get_num_sectors(i);
|
||||
@ -338,7 +338,7 @@ sgi_list_table(int xtra)
|
||||
printf("----- Bootinfo -----\nBootfile: %s\n"
|
||||
"----- Directory Entries -----\n",
|
||||
sgilabel->boot_file);
|
||||
for (i = 0 ; i < sgi_volumes; i++) {
|
||||
for (i = 0; i < sgi_volumes; i++) {
|
||||
if (sgilabel->directory[i].vol_file_size) {
|
||||
uint32_t start = SGI_SSWAP32(sgilabel->directory[i].vol_file_start);
|
||||
uint32_t len = SGI_SSWAP32(sgilabel->directory[i].vol_file_size);
|
||||
|
@ -647,7 +647,7 @@ sun_list_table(int xtra)
|
||||
|
||||
printf("%*s Flag Start End Blocks Id System\n",
|
||||
w + 1, "Device");
|
||||
for (i = 0 ; i < partitions; i++) {
|
||||
for (i = 0; i < partitions; i++) {
|
||||
if (sunlabel->partitions[i].num_sectors) {
|
||||
uint32_t start = SUN_SSWAP32(sunlabel->partitions[i].start_cylinder) * heads * sectors;
|
||||
uint32_t len = SUN_SSWAP32(sunlabel->partitions[i].num_sectors);
|
||||
|
Loading…
Reference in New Issue
Block a user