style fix (stray space before ';')
diff --git a/applets/install.sh b/applets/install.sh
index 4ec96c2..b023502 100755
--- a/applets/install.sh
+++ b/applets/install.sh
@@ -43,7 +43,7 @@
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 @@
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
diff --git a/archival/dpkg.c b/archival/dpkg.c
index c40a932..0c1f541 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -712,7 +712,7 @@
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";
diff --git a/archival/gzip.c b/archival/gzip.c
index fdf2a79..08c660e 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -49,10 +49,10 @@
#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)
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index 1a7a687..e8ef929 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -122,13 +122,13 @@
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];
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 04112c1..e5353b4 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -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'.
*/
diff --git a/e2fsprogs/old_e2fsprogs/chattr.c b/e2fsprogs/old_e2fsprogs/chattr.c
index 8f62a5d..b933938 100644
--- a/e2fsprogs/old_e2fsprogs/chattr.c
+++ b/e2fsprogs/old_e2fsprogs/chattr.c
@@ -101,7 +101,7 @@
} else
return EOF;
- for (; *arg ; ++arg)
+ for (; *arg; ++arg)
(*fl) |= get_flag(*arg);
return 1;
diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c
index 44ae117..efb8700 100644
--- a/e2fsprogs/old_e2fsprogs/e2fsck.c
+++ b/e2fsprogs/old_e2fsprogs/e2fsck.c
@@ -4701,7 +4701,7 @@
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 @@
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++;
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/badblocks.c b/e2fsprogs/old_e2fsprogs/ext2fs/badblocks.c
index 7804396..6e5cc10 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/badblocks.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/badblocks.c
@@ -223,7 +223,7 @@
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;
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/block.c b/e2fsprogs/old_e2fsprogs/ext2fs/block.c
index 0a757b2..4980969 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/block.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/block.c
@@ -343,7 +343,7 @@
/*
* 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);
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/fileio.c b/e2fsprogs/old_e2fsprogs/ext2fs/fileio.c
index c56a21a..5a5ad3e 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/fileio.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/fileio.c
@@ -228,7 +228,7 @@
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;
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/openfs.c b/e2fsprogs/old_e2fsprogs/ext2fs/openfs.c
index 716be06..1b27119 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/openfs.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/openfs.c
@@ -273,7 +273,7 @@
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)
diff --git a/e2fsprogs/old_e2fsprogs/fsck.c b/e2fsprogs/old_e2fsprogs/fsck.c
index 0ad62ca..cf39807 100644
--- a/e2fsprogs/old_e2fsprogs/fsck.c
+++ b/e2fsprogs/old_e2fsprogs/fsck.c
@@ -1357,7 +1357,7 @@
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);
diff --git a/e2fsprogs/old_e2fsprogs/mke2fs.c b/e2fsprogs/old_e2fsprogs/mke2fs.c
index 9ea5d5c..c1deefd 100644
--- a/e2fsprogs/old_e2fsprogs/mke2fs.c
+++ b/e2fsprogs/old_e2fsprogs/mke2fs.c
@@ -59,14 +59,14 @@
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 @@
{
int l;
- for (l=0; arg ; l++)
+ for (l = 0; arg; l++)
arg = arg / 10;
return l;
}
@@ -1226,7 +1226,7 @@
* 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;
diff --git a/editors/diff.c b/editors/diff.c
index ef39623..88f8b22 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -328,11 +328,11 @@
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;
diff --git a/editors/vi.c b/editors/vi.c
index 97efe0c..c4f3a83 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2800,7 +2800,7 @@
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
diff --git a/include/usage.h b/include/usage.h
index 9c77c70..679c347 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -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 @@
"$ 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" \
diff --git a/include/xatonum.h b/include/xatonum.h
index e613fce..3875455 100644
--- a/include/xatonum.h
+++ b/include/xatonum.h
@@ -18,7 +18,7 @@
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); \
diff --git a/libbb/human_readable.c b/libbb/human_readable.c
index 7714abe..09fa82c 100644
--- a/libbb/human_readable.c
+++ b/libbb/human_readable.c
@@ -75,7 +75,7 @@
if (frac >= 5) {
++val;
}
- f = "%llu%*c" /* fmt_no_tenths */ ;
+ f = "%llu%*c" /* fmt_no_tenths */;
frac = 1;
}
#endif
diff --git a/libbb/speed_table.c b/libbb/speed_table.c
index 0f0b33d..94a2962 100644
--- a/libbb/speed_table.c
+++ b/libbb/speed_table.c
@@ -94,7 +94,7 @@
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 @@
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;
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c
index 4e476f2..b535ef5 100644
--- a/libpwdgrp/pwd_grp.c
+++ b/libpwdgrp/pwd_grp.c
@@ -642,7 +642,7 @@
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 @@
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) {
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index d873045..6db0c7b 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -1600,7 +1600,7 @@
}
/* 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 @@
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;
diff --git a/networking/interface.c b/networking/interface.c
index 79f79c9..92d7f5d 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -803,7 +803,7 @@
.type = ARPHRD_SIT,
.print = UNSPEC_print,
.suppress_null_addr = 1
-} ;
+};
#endif
static const struct hwtype *const hwtypes[] = {
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c
index a6ab399..2d597ea 100644
--- a/networking/libiproute/ip_parse_common_args.c
+++ b/networking/libiproute/ip_parse_common_args.c
@@ -82,7 +82,7 @@
argc--;
argv++;
}
- _SL_ = oneline ? '\\' : '\n' ;
+ _SL_ = oneline ? '\\' : '\n';
*argcp = argc;
*argvp = argv;
}
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index fc10ba3..955a9d9 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -46,7 +46,7 @@
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);
diff --git a/shell/ash.c b/shell/ash.c
index 32c4402..5f4d176 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11268,7 +11268,7 @@
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) {
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 3b9892f..0a8dbe9 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -1823,7 +1823,7 @@
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 @@
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) {
diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c
index b7e09f3..25e75b0 100644
--- a/util-linux/fdisk_sgi.c
+++ b/util-linux/fdisk_sgi.c
@@ -142,7 +142,7 @@
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 @@
{
int i;
- for (i = 0; i < 17 ; i++)
+ for (i = 0; i < 17; i++)
setfreelist(i, 0, 0);
}
@@ -162,7 +162,7 @@
{
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 @@
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 @@
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);
diff --git a/util-linux/fdisk_sun.c b/util-linux/fdisk_sun.c
index d4614fd..274b103 100644
--- a/util-linux/fdisk_sun.c
+++ b/util-linux/fdisk_sun.c
@@ -647,7 +647,7 @@
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);