summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2010-10-29 11:46:52 +0200
committerDenys Vlasenko2010-10-29 11:46:52 +0200
commitfb132e47370378474c68ad22c1c0cb2ccee178de (patch)
tree4f78d0fdd1c2fa2341c7d9bb17f9d98d099a238c
parent66cb7bed33da605674c3d24734466b8e8a60e337 (diff)
downloadbusybox-fb132e47370378474c68ad22c1c0cb2ccee178de.zip
busybox-fb132e47370378474c68ad22c1c0cb2ccee178de.tar.gz
whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--archival/ar.c16
-rw-r--r--archival/bz/bzlib.c2
-rw-r--r--archival/bz/compress.c9
-rw-r--r--archival/dpkg.c11
-rw-r--r--archival/dpkg_deb.c10
-rw-r--r--archival/libunarchive/decompress_bunzip2.c4
-rw-r--r--console-tools/kbd_mode.c4
-rw-r--r--console-tools/loadfont.c8
-rw-r--r--console-tools/showkey.c12
-rw-r--r--coreutils/date.c2
-rw-r--r--coreutils/dd.c2
-rw-r--r--coreutils/mv.c2
-rw-r--r--coreutils/nice.c6
-rw-r--r--coreutils/od.c4
-rw-r--r--coreutils/sort.c4
-rw-r--r--coreutils/test.c6
-rw-r--r--coreutils/tr.c8
-rw-r--r--coreutils/wc.c6
-rw-r--r--e2fsprogs/old_e2fsprogs/e2fsck.h2
-rw-r--r--editors/awk.c14
-rw-r--r--editors/diff.c2
-rw-r--r--editors/sed.c6
-rw-r--r--include/grp_.h2
-rw-r--r--include/platform.h2
-rw-r--r--include/pwd_.h2
-rw-r--r--include/rtc_.h4
-rw-r--r--libbb/hash_md5_sha.c8
-rw-r--r--libbb/pw_encrypt_sha.c6
-rw-r--r--libbb/simplify_path.c10
-rw-r--r--libpwdgrp/pwd_grp_internal.c4
-rw-r--r--miscutils/conspy.c8
-rw-r--r--miscutils/ubi_attach_detach.c4
-rw-r--r--modutils/rmmod.c4
-rw-r--r--networking/httpd.c4
-rw-r--r--networking/inetd.c2
-rw-r--r--networking/ip.c4
-rw-r--r--networking/ipcalc.c6
-rw-r--r--networking/libiproute/ip_parse_common_args.c15
-rw-r--r--networking/libiproute/ipaddress.c10
-rw-r--r--networking/libiproute/iplink.c6
-rw-r--r--networking/libiproute/iproute.c15
-rw-r--r--networking/libiproute/iprule.c21
-rw-r--r--networking/libiproute/iptunnel.c10
-rw-r--r--networking/libiproute/libnetlink.c12
-rw-r--r--networking/libiproute/libnetlink.h10
-rw-r--r--networking/libiproute/ll_addr.c12
-rw-r--r--networking/libiproute/ll_map.c15
-rw-r--r--networking/libiproute/ll_proto.c12
-rw-r--r--networking/libiproute/ll_types.c12
-rw-r--r--networking/libiproute/rt_names.c12
-rw-r--r--networking/libiproute/rtm_map.c13
-rw-r--r--networking/libiproute/utils.c4
-rw-r--r--networking/libiproute/utils.h6
-rw-r--r--networking/nameif.c4
-rw-r--r--networking/netstat.c2
-rw-r--r--networking/ntpd.c6
-rw-r--r--networking/ntpd_simple.c2
-rw-r--r--networking/slattach.c4
-rw-r--r--networking/telnetd.c6
-rw-r--r--networking/vconfig.c4
-rw-r--r--networking/wget.c6
-rw-r--r--procps/iostat.c10
-rw-r--r--procps/mpstat.c14
-rw-r--r--procps/sysctl.c2
-rw-r--r--selinux/sestatus.c8
-rw-r--r--shell/ash_test/recho.c13
-rw-r--r--shell/ash_test/zecho.c5
-rw-r--r--util-linux/fbset.c6
-rw-r--r--util-linux/hexdump.c12
69 files changed, 231 insertions, 268 deletions
diff --git a/archival/ar.c b/archival/ar.c
index 05556c6..730d7c6 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -179,17 +179,17 @@ static void FAST_FUNC header_verbose_list_ar(const file_header_t *file_header)
);
}
-#define AR_OPT_VERBOSE (1 << 0)
-#define AR_OPT_PRESERVE_DATE (1 << 1)
+#define AR_OPT_VERBOSE (1 << 0)
+#define AR_OPT_PRESERVE_DATE (1 << 1)
/* "ar r" implies create, but warns about it. c suppresses warning.
* bbox accepts but ignores it: */
-#define AR_OPT_CREATE (1 << 2)
+#define AR_OPT_CREATE (1 << 2)
-#define AR_CMD_PRINT (1 << 3)
-#define FIRST_CMD AR_CMD_PRINT
-#define AR_CMD_LIST (1 << 4)
-#define AR_CMD_EXTRACT (1 << 5)
-#define AR_CMD_INSERT (1 << 6)
+#define AR_CMD_PRINT (1 << 3)
+#define FIRST_CMD AR_CMD_PRINT
+#define AR_CMD_LIST (1 << 4)
+#define AR_CMD_EXTRACT (1 << 5)
+#define AR_CMD_INSERT (1 << 6)
int ar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ar_main(int argc UNUSED_PARAM, char **argv)
diff --git a/archival/bz/bzlib.c b/archival/bz/bzlib.c
index 8341794..b3beeab 100644
--- a/archival/bz/bzlib.c
+++ b/archival/bz/bzlib.c
@@ -28,7 +28,7 @@ in the file LICENSE.
* 0.9.0a/b -- no changes in this file.
* 0.9.0c -- made zero-length BZ_FLUSH work correctly in bzCompress().
* fixed bzWrite/bzRead to ignore zero-length requests.
- * fixed bzread to correctly handle read requests after EOF.
+ * fixed bzread to correctly handle read requests after EOF.
* wrong parameter order in call to bzDecompressInit in
* bzBuffToBuffDecompress. Fixed.
*/
diff --git a/archival/bz/compress.c b/archival/bz/compress.c
index b9b0949..6f1c70a 100644
--- a/archival/bz/compress.c
+++ b/archival/bz/compress.c
@@ -134,15 +134,14 @@ void generateMTFValues(EState* s)
* holds the original block data.
*
* The first thing to do is generate the MTF values,
- * and put them in
- * ((uint16_t*)s->arr1)[0 .. s->nblock-1].
+ * and put them in ((uint16_t*)s->arr1)[0 .. s->nblock-1].
+ *
* Because there are strictly fewer or equal MTF values
* than block values, ptr values in this area are overwritten
* with MTF values only when they are no longer needed.
*
* The final compressed bitstream is generated into the
- * area starting at
- * &((uint8_t*)s->arr2)[s->nblock]
+ * area starting at &((uint8_t*)s->arr2)[s->nblock]
*
* These storage aliases are set up in bzCompressInit(),
* except for the last one, which is arranged in
@@ -459,7 +458,7 @@ void sendMTFValues(EState* s)
}
AssertH(nGroups < 8, 3002);
- AssertH(nSelectors < 32768 && nSelectors <= (2 + (900000 / BZ_G_SIZE)), 3003);
+ AssertH(nSelectors < 32768 && nSelectors <= (2 + (900000 / BZ_G_SIZE)), 3003);
/*--- Compute MTF values for the selectors. ---*/
{
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 508b429..53e30d5 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -939,8 +939,8 @@ static int package_satisfies_dependency(int package, int depend_type)
return 0;
switch (depend_type) {
- case EDGE_PRE_DEPENDS: return get_status(status_num, 3) == search_name_hashtable("installed");
- case EDGE_DEPENDS: return get_status(status_num, 1) == search_name_hashtable("install");
+ case EDGE_PRE_DEPENDS: return get_status(status_num, 3) == search_name_hashtable("installed");
+ case EDGE_DEPENDS: return get_status(status_num, 1) == search_name_hashtable("install");
}
return 0;
}
@@ -967,7 +967,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
conflicts[conflicts_num] = package_num;
conflicts_num++;
/* add provides to conflicts list */
- for (j = 0; j < package_hashtable[package_num]->num_of_edges; j++) {
+ for (j = 0; j < package_hashtable[package_num]->num_of_edges; j++) {
if (package_hashtable[package_num]->edge[j]->type == EDGE_PROVIDES) {
const int conflicts_package_num = search_package_hashtable(
package_hashtable[package_num]->edge[j]->name,
@@ -1067,12 +1067,13 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
if (package_edge->type == EDGE_OR_PRE_DEPENDS
|| package_edge->type == EDGE_OR_DEPENDS
- ) { /* start an EDGE_OR_ list */
+ ) {
+ /* start an EDGE_OR_ list */
number_of_alternatives = package_edge->version;
root_of_alternatives = package_edge;
continue;
}
- if (number_of_alternatives == 0) { /* not in the middle of an EDGE_OR_ list */
+ if (number_of_alternatives == 0) { /* not in the middle of an EDGE_OR_ list */
number_of_alternatives = 1;
root_of_alternatives = NULL;
}
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 4c627e8..0ce7c02 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -7,11 +7,11 @@
#include "libbb.h"
#include "unarchive.h"
-#define DPKG_DEB_OPT_CONTENTS 1
-#define DPKG_DEB_OPT_CONTROL 2
-#define DPKG_DEB_OPT_FIELD 4
-#define DPKG_DEB_OPT_EXTRACT 8
-#define DPKG_DEB_OPT_EXTRACT_VERBOSE 16
+#define DPKG_DEB_OPT_CONTENTS 1
+#define DPKG_DEB_OPT_CONTROL 2
+#define DPKG_DEB_OPT_FIELD 4
+#define DPKG_DEB_OPT_EXTRACT 8
+#define DPKG_DEB_OPT_EXTRACT_VERBOSE 16
int dpkg_deb_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dpkg_deb_main(int argc, char **argv)
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index 549c8b1..cf6e198 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -86,8 +86,8 @@ struct bunzip_data {
/* Big things go last (register-relative addressing can be larger for big offsets) */
uint32_t crc32Table[256];
- unsigned char selectors[32768]; /* nSelectors=15 bits */
- struct group_data groups[MAX_GROUPS]; /* Huffman coding tables */
+ unsigned char selectors[32768]; /* nSelectors=15 bits */
+ struct group_data groups[MAX_GROUPS]; /* Huffman coding tables */
};
/* typedef struct bunzip_data bunzip_data; -- done in .h file */
diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c
index 14f2ae5..1481d0d 100644
--- a/console-tools/kbd_mode.c
+++ b/console-tools/kbd_mode.c
@@ -16,9 +16,9 @@ int kbd_mode_main(int argc UNUSED_PARAM, char **argv)
{
enum {
SCANCODE = (1 << 0),
- ASCII = (1 << 1),
+ ASCII = (1 << 1),
MEDIUMRAW = (1 << 2),
- UNICODE = (1 << 3),
+ UNICODE = (1 << 3),
};
int fd;
unsigned opt;
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index 3c77813..079626c 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -136,7 +136,7 @@ static void do_loadfont(int fd, unsigned char *inbuf, int height, int width, int
* Example:
* At the font position for a capital A-ring glyph, we
* may have:
- * 00C5,212B,FFFE,0041,030A,FFFF
+ * 00C5,212B,FFFE,0041,030A,FFFF
* Some font positions may be described by sequences only,
* namely when there is no precomposed Unicode value for the glyph.
*/
@@ -159,7 +159,7 @@ static void do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize,
int glyph;
uint16_t unicode;
- maxct = tailsz; /* more than enough */
+ maxct = tailsz; /* more than enough */
up = xmalloc(maxct * sizeof(*up));
for (glyph = 0; glyph < fontsize; glyph++) {
@@ -255,10 +255,10 @@ static void do_load(int fd, unsigned char *buffer, size_t len)
} else
#endif
#if ENABLE_FEATURE_LOADFONT_RAW
- if (len == 9780) { /* file with three code pages? */
+ if (len == 9780) { /* file with three code pages? */
charsize = height = 16;
font += 40;
- } else if ((len & 0377) == 0) { /* bare font */
+ } else if ((len & 0377) == 0) { /* bare font */
charsize = height = len / 256;
} else
#endif
diff --git a/console-tools/showkey.c b/console-tools/showkey.c
index b29c84d..e7834f7 100644
--- a/console-tools/showkey.c
+++ b/console-tools/showkey.c
@@ -16,9 +16,9 @@ struct globals {
struct termios tio, tio0;
};
#define G (*ptr_to_globals)
-#define kbmode (G.kbmode)
-#define tio (G.tio)
-#define tio0 (G.tio0)
+#define kbmode (G.kbmode)
+#define tio (G.tio)
+#define tio0 (G.tio0)
#define INIT_G() do { \
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
} while (0)
@@ -46,9 +46,9 @@ int showkey_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int showkey_main(int argc UNUSED_PARAM, char **argv)
{
enum {
- OPT_a = (1<<0), // display the decimal/octal/hex values of the keys
- OPT_k = (1<<1), // display only the interpreted keycodes (default)
- OPT_s = (1<<2), // display only the raw scan-codes
+ OPT_a = (1<<0), // display the decimal/octal/hex values of the keys
+ OPT_k = (1<<1), // display only the interpreted keycodes (default)
+ OPT_s = (1<<2), // display only the raw scan-codes
};
INIT_G();
diff --git a/coreutils/date.c b/coreutils/date.c
index 87cc8f2..a804075 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -278,7 +278,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
}
/* Correct any day of week and day of year etc. fields */
- tm_time.tm_isdst = -1; /* Be sure to recheck dst */
+ tm_time.tm_isdst = -1; /* Be sure to recheck dst */
ts.tv_sec = validate_tm_time(date_str, &tm_time);
maybe_set_utc(opt);
diff --git a/coreutils/dd.c b/coreutils/dd.c
index aa6f765..347a194 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -24,7 +24,7 @@ static const struct suffix_mult dd_suffixes[] = {
{ "b", 512 },
{ "kD", 1000 },
{ "k", 1024 },
- { "K", 1024 }, /* compat with coreutils dd */
+ { "K", 1024 }, /* compat with coreutils dd */
{ "MD", 1000000 },
{ "M", 1048576 },
{ "GD", 1000000000 },
diff --git a/coreutils/mv.c b/coreutils/mv.c
index 245639b..399f391 100644
--- a/coreutils/mv.c
+++ b/coreutils/mv.c
@@ -92,7 +92,7 @@ int mv_main(int argc, char **argv)
|| (flags & OPT_FILEUTILS_INTERACTIVE))
) {
if (fprintf(stderr, "mv: overwrite '%s'? ", dest) < 0) {
- goto RET_1; /* Ouch! fprintf failed! */
+ goto RET_1; /* Ouch! fprintf failed! */
}
if (!bb_ask_confirmation()) {
goto RET_0;
diff --git a/coreutils/nice.c b/coreutils/nice.c
index 6b8fce2..35d6bf3 100644
--- a/coreutils/nice.c
+++ b/coreutils/nice.c
@@ -17,12 +17,12 @@ int nice_main(int argc, char **argv)
old_priority = getpriority(PRIO_PROCESS, 0);
- if (!*++argv) { /* No args, so (GNU) output current nice value. */
+ if (!*++argv) { /* No args, so (GNU) output current nice value. */
printf("%d\n", old_priority);
fflush_stdout_and_exit(EXIT_SUCCESS);
}
- adjustment = 10; /* Set default adjustment. */
+ adjustment = 10; /* Set default adjustment. */
if (argv[0][0] == '-') {
if (argv[0][1] == 'n') { /* -n */
@@ -32,7 +32,7 @@ int nice_main(int argc, char **argv)
} else { /* -NNN (NNN may be negative) == -n NNN */
argv[0] += 1; argv--; argc++;
}
- if (argc < 4) { /* Missing priority and/or utility! */
+ if (argc < 4) { /* Missing priority and/or utility! */
bb_show_usage();
}
adjustment = xatoi_range(argv[1], INT_MIN/2, INT_MAX/2);
diff --git a/coreutils/od.c b/coreutils/od.c
index dcd6934..e627116 100644
--- a/coreutils/od.c
+++ b/coreutils/od.c
@@ -4,7 +4,7 @@
* Based on code from util-linux v 2.11l
*
* Copyright (c) 1990
- * The Regents of the University of California. All rights reserved.
+ * The Regents of the University of California. All rights reserved.
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
@@ -174,7 +174,7 @@ int od_main(int argc, char **argv)
bb_dump_add(dumper, "\" \"");
}
bb_dump_add(dumper, add_strings[(int)od_o2si[(p - od_opts)]]);
- } else { /* P, p, s, w, or other unhandled */
+ } else { /* P, p, s, w, or other unhandled */
bb_show_usage();
}
}
diff --git a/coreutils/sort.c b/coreutils/sort.c
index eccc2d4..3562464 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -52,8 +52,8 @@ enum {
static char key_separator;
static struct sort_key {
- struct sort_key *next_key; /* linked list */
- unsigned range[4]; /* start word, start char, end word, end char */
+ struct sort_key *next_key; /* linked list */
+ unsigned range[4]; /* start word, start char, end word, end char */
unsigned flags;
} *key_list;
diff --git a/coreutils/test.c b/coreutils/test.c
index f18e3ae..6524c4f 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -49,9 +49,9 @@
* state. */
/* test(1) accepts the following grammar:
- oexpr ::= aexpr | aexpr "-o" oexpr ;
- aexpr ::= nexpr | nexpr "-a" aexpr ;
- nexpr ::= primary | "!" primary
+ oexpr ::= aexpr | aexpr "-o" oexpr ;
+ aexpr ::= nexpr | nexpr "-a" aexpr ;
+ nexpr ::= primary | "!" primary
primary ::= unary-operator operand
| operand binary-operator operand
| operand
diff --git a/coreutils/tr.c b/coreutils/tr.c
index d6bc7d2..21d77ef 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -203,7 +203,7 @@ static unsigned expand(const char *arg, char **buffer_p)
buffer[pos++] = *arg; /* copy CHAR */
if (!arg[0] || arg[1] != '=' || arg[2] != ']')
bb_show_usage();
- arg += 3; /* skip CHAR=] */
+ arg += 3; /* skip CHAR=] */
continue;
}
/* The rest of "[xyz..." cases is treated as normal
@@ -258,9 +258,9 @@ int tr_main(int argc UNUSED_PARAM, char **argv)
char *invec = vector + ASCII;
char *outvec = vector + ASCII * 2;
-#define TR_OPT_complement (3 << 0)
-#define TR_OPT_delete (1 << 2)
-#define TR_OPT_squeeze_reps (1 << 3)
+#define TR_OPT_complement (3 << 0)
+#define TR_OPT_delete (1 << 2)
+#define TR_OPT_squeeze_reps (1 << 3)
for (i = 0; i < ASCII; i++) {
vector[i] = i;
diff --git a/coreutils/wc.c b/coreutils/wc.c
index ecadae5..fe3f274 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -153,7 +153,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
bb_simple_perror_msg(arg);
status = EXIT_FAILURE;
}
- goto DO_EOF; /* Treat an EOF as '\r'. */
+ goto DO_EOF; /* Treat an EOF as '\r'. */
}
/* Cater for -c and -m */
@@ -179,7 +179,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
*/
if (c == '\t') {
linepos = (linepos | 7) + 1;
- } else { /* '\n', '\r', '\f', or '\v' */
+ } else { /* '\n', '\r', '\f', or '\v' */
DO_EOF:
if (linepos > counts[WC_LENGTH]) {
counts[WC_LENGTH] = linepos;
@@ -230,7 +230,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
* effect of trashing the totals array after outputting it, but that's
* irrelavent since we no longer need it. */
if (num_files > 1) {
- num_files = 0; /* Make sure we don't get here again. */
+ num_files = 0; /* Make sure we don't get here again. */
arg = "total";
pcounts = totals;
--argv;
diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.h b/e2fsprogs/old_e2fsprogs/e2fsck.h
index fdfa2d8..330209d 100644
--- a/e2fsprogs/old_e2fsprogs/e2fsck.h
+++ b/e2fsprogs/old_e2fsprogs/e2fsck.h
@@ -629,7 +629,7 @@ struct e2fsck_struct {
};
-#define tid_gt(x, y) ((x - y) > 0)
+#define tid_gt(x, y) ((x - y) > 0)
static inline int tid_geq(tid_t x, tid_t y)
{
diff --git a/editors/awk.c b/editors/awk.c
index 8bc5675..2eeb9d7 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -277,10 +277,10 @@ enum {
/* tokens and their corresponding info values */
-#define NTC "\377" /* switch to next token class (tc<<1) */
-#define NTCC '\377'
+#define NTC "\377" /* switch to next token class (tc<<1) */
+#define NTCC '\377'
-#define OC_B OC_BUILTIN
+#define OC_B OC_BUILTIN
static const char tokenlist[] ALIGN1 =
"\1(" NTC
@@ -368,7 +368,7 @@ static const uint32_t tokeninfo[] = {
OC_B|B_ss|P(0x8f), OC_FBLTIN|F_ti, OC_B|B_ti|P(0x0b), OC_B|B_mt|P(0x0b),
OC_B|B_lo|P(0x49), OC_B|B_up|P(0x49),
OC_GETLINE|SV|P(0),
- 0, 0,
+ 0, 0,
0,
0 /* END */
};
@@ -380,7 +380,7 @@ enum {
ORS, RS, RT, FILENAME,
SUBSEP, F0, ARGIND, ARGC,
ARGV, ERRNO, FNR, NR,
- NF, IGNORECASE, ENVIRON, NUM_INTERNAL_VARS
+ NF, IGNORECASE, ENVIRON, NUM_INTERNAL_VARS
};
static const char vNames[] ALIGN1 =
@@ -2335,7 +2335,7 @@ static var *evaluate(node *op, var *res)
#define fnargs (G.evaluate__fnargs)
/* seed is initialized to 1 */
#define seed (G.evaluate__seed)
-#define sreg (G.evaluate__sreg)
+#define sreg (G.evaluate__sreg)
var *v1;
@@ -2611,7 +2611,7 @@ static var *evaluate(node *op, var *res)
rsm->F = popen(L.s, "r");
rsm->is_pipe = TRUE;
} else {
- rsm->F = fopen_for_read(L.s); /* not xfopen! */
+ rsm->F = fopen_for_read(L.s); /* not xfopen! */
}
}
} else {
diff --git a/editors/diff.c b/editors/diff.c
index d9d709d..cc7ba47 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -230,7 +230,7 @@ static int search(const int *c, int k, int y, const struct cand *list)
{
int i, j;
- if (list[c[k]].y < y) /* quick look for typical case */
+ if (list[c[k]].y < y) /* quick look for typical case */
return k + 1;
for (i = 0, j = k + 1;;) {
diff --git a/editors/sed.c b/editors/sed.c
index 964d040..b91acfb 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -117,9 +117,9 @@ struct globals {
char *add_cmd_line;
struct pipeline {
- char *buf; /* Space to hold string */
- int idx; /* Space used */
- int len; /* Space allocated */
+ char *buf; /* Space to hold string */
+ int idx; /* Space used */
+ int len; /* Space allocated */
} pipeline;
} FIX_ALIASING;
#define G (*(struct globals*)&bb_common_bufsiz1)
diff --git a/include/grp_.h b/include/grp_.h
index 7a95f88..5c24d55 100644
--- a/include/grp_.h
+++ b/include/grp_.h
@@ -18,7 +18,7 @@
02111-1307 USA.
*/
/*
- * POSIX Standard: 9.2.1 Group Database Access <grp.h>
+ * POSIX Standard: 9.2.1 Group Database Access <grp.h>
*/
#ifndef BB_GRP_H
#define BB_GRP_H 1
diff --git a/include/platform.h b/include/platform.h
index 855cb28..2666eeb 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -155,7 +155,7 @@
# include <sex.h>
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
|| defined(__APPLE__)
-# include <sys/resource.h> /* rlimit */
+# include <sys/resource.h> /* rlimit */
# include <machine/endian.h>
# define bswap_64 __bswap64
# define bswap_32 __bswap32
diff --git a/include/pwd_.h b/include/pwd_.h
index aa63ac9..e40b71d 100644
--- a/include/pwd_.h
+++ b/include/pwd_.h
@@ -18,7 +18,7 @@
02111-1307 USA. */
/*
- * POSIX Standard: 9.2.2 User Database Access <pwd.h>
+ * POSIX Standard: 9.2.2 User Database Access <pwd.h>
*/
#ifndef BB_PWD_H
diff --git a/include/rtc_.h b/include/rtc_.h
index bd322c9..750fc20 100644
--- a/include/rtc_.h
+++ b/include/rtc_.h
@@ -35,9 +35,9 @@ struct linux_rtc_time {
};
struct linux_rtc_wkalrm {
- unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
+ unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */
- struct linux_rtc_time time; /* time the alarm is set to */
+ struct linux_rtc_time time; /* time the alarm is set to */
};
/*
diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c
index e427f60..b87d1dd 100644
--- a/libbb/hash_md5_sha.c
+++ b/libbb/hash_md5_sha.c
@@ -158,11 +158,11 @@ static void FAST_FUNC md5_process_block64(md5_ctx_t *ctx)
};
static const char P_array[] ALIGN1 = {
# if MD5_SIZE_VS_SPEED > 1
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 1 */
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* 1 */
# endif
- 1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, /* 2 */
- 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, /* 3 */
- 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9 /* 4 */
+ 1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, /* 2 */
+ 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, /* 3 */
+ 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9 /* 4 */
};
#endif
uint32_t *words = (void*) ctx->wbuffer;
diff --git a/libbb/pw_encrypt_sha.c b/libbb/pw_encrypt_sha.c
index 070e0d4..e46848b 100644
--- a/libbb/pw_encrypt_sha.c
+++ b/libbb/pw_encrypt_sha.c
@@ -196,9 +196,9 @@ sha_crypt(/*const*/ char *key_data, /*const*/ char *salt_data)
//TODO: replace with something like
// bb_uuencode(cp, src, length, bb_uuenc_tbl_XXXbase64);
#define b64_from_24bit(B2, B1, B0, N) \
-do { \
- unsigned w = ((B2) << 16) | ((B1) << 8) | (B0); \
- resptr = to64(resptr, w, N); \
+do { \
+ unsigned w = ((B2) << 16) | ((B1) << 8) | (B0); \
+ resptr = to64(resptr, w, N); \
} while (0)
if (is_sha512 == '5') {
unsigned i = 0;
diff --git a/libbb/simplify_path.c b/libbb/simplify_path.c
index 3818d32..89dc5bd 100644
--- a/libbb/simplify_path.c
+++ b/libbb/simplify_path.c
@@ -15,17 +15,17 @@ char* FAST_FUNC bb_simplify_abs_path_inplace(char *start)
p = s = start;
do {
if (*p == '/') {
- if (*s == '/') { /* skip duplicate (or initial) slash */
+ if (*s == '/') { /* skip duplicate (or initial) slash */
continue;
}
if (*s == '.') {
- if (s[1] == '/' || !s[1]) { /* remove extra '.' */
+ if (s[1] == '/' || !s[1]) { /* remove extra '.' */
continue;
}
if ((s[1] == '.') && (s[2] == '/' || !s[2])) {
++s;
if (p > start) {
- while (*--p != '/') /* omit previous dir */
+ while (*--p != '/') /* omit previous dir */
continue;
}
continue;
@@ -35,8 +35,8 @@ char* FAST_FUNC bb_simplify_abs_path_inplace(char *start)
*++p = *s;
} while (*++s);
- if ((p == start) || (*p != '/')) { /* not a trailing slash */
- ++p; /* so keep last character */
+ if ((p == start) || (*p != '/')) { /* not a trailing slash */
+ ++p; /* so keep last character */
}
*p = '\0';
return p;
diff --git a/libpwdgrp/pwd_grp_internal.c b/libpwdgrp/pwd_grp_internal.c
index 04e436f..d6483be 100644
--- a/libpwdgrp/pwd_grp_internal.c
+++ b/libpwdgrp/pwd_grp_internal.c
@@ -37,12 +37,12 @@ int GETXXKEY_R_FUNC(GETXXKEY_R_KEYTYPE key,
while (1) {
rv = bb__pgsreader(GETXXKEY_R_PARSER, resultbuf, buffer, buflen, stream);
if (!rv) {
- if (GETXXKEY_R_TEST(resultbuf)) { /* Found key? */
+ if (GETXXKEY_R_TEST(resultbuf)) { /* found key? */
*result = resultbuf;
break;
}
} else {
- if (rv == ENOENT) { /* end-of-file encountered. */
+ if (rv == ENOENT) { /* EOF encountered */
rv = 0;
}
break;
diff --git a/miscutils/conspy.c b/miscutils/conspy.c
index 040fa86..723b420 100644
--- a/miscutils/conspy.c
+++ b/miscutils/conspy.c
@@ -420,19 +420,19 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
if (G.remote.cursor_x < G.x) {
G.x = G.remote.cursor_x;
- i = 0; // force refresh
+ i = 0; // force refresh
}
if (nx > G.x) {
G.x = nx;
- i = 0; // force refresh
+ i = 0; // force refresh
}
if (G.remote.cursor_y < G.y) {
G.y = G.remote.cursor_y;
- i = 0; // force refresh
+ i = 0; // force refresh
}
if (ny > G.y) {
G.y = ny;
- i = 0; // force refresh
+ i = 0; // force refresh
}
}
diff --git a/miscutils/ubi_attach_detach.c b/miscutils/ubi_attach_detach.c
index 18ffd4d..b74d97b 100644
--- a/miscutils/ubi_attach_detach.c
+++ b/miscutils/ubi_attach_detach.c
@@ -26,8 +26,8 @@
#include "libbb.h"
#include <mtd/ubi-user.h>
-#define OPTION_M (1 << 0)
-#define OPTION_D (1 << 1)
+#define OPTION_M (1 << 0)
+#define OPTION_D (1 << 1)
#define do_attach (ENABLE_UBIATTACH && \
(!ENABLE_UBIDETACH || (applet_name[3] == 'a')))
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index dde7773..2486511 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -35,9 +35,9 @@ int rmmod_main(int argc UNUSED_PARAM, char **argv)
/* Parse command line. */
n = getopt32(argv, "wfas"); // -s ignored
argv += optind;
- if (n & 1) // --wait
+ if (n & 1) // --wait
flags &= ~O_NONBLOCK;
- if (n & 2) // --force
+ if (n & 2) // --force
flags |= O_TRUNC;
if (n & 4) {
/* Unload _all_ unused modules via NULL delete_module() call */
diff --git a/networking/httpd.c b/networking/httpd.c
index c174958..fa42d98 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -231,7 +231,7 @@ struct globals {
int verbose; /* must be int (used by getopt32) */
smallint flg_deny_all;
- unsigned rmt_ip; /* used for IP-based allow/deny rules */
+ unsigned rmt_ip; /* used for IP-based allow/deny rules */
time_t last_mod;
char *rmt_ip_str; /* for $REMOTE_ADDR and $REMOTE_PORT */
const char *bind_addr_or_port;
@@ -267,7 +267,7 @@ struct globals {
#if ENABLE_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
Htaccess *script_i; /* config script interpreters */
#endif
- char *iobuf; /* [IOBUF_SIZE] */
+ char *iobuf; /* [IOBUF_SIZE] */
#define hdr_buf bb_common_bufsiz1
char *hdr_ptr;
int hdr_cnt;
diff --git a/networking/inetd.c b/networking/inetd.c
index 7030062..ac42c52 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -295,7 +295,7 @@ struct globals {
struct rlimit rlim_ofile;
servtab_t *serv_list;
int global_queuelen;
- int maxsock; /* max fd# in allsock, -1: unknown */
+ int maxsock; /* max fd# in allsock, -1: unknown */
/* whenever maxsock grows, prev_maxsock is set to new maxsock,
* but if maxsock is set to -1, prev_maxsock is not changed */
int prev_maxsock;
diff --git a/networking/ip.c b/networking/ip.c
index 7b1e2eb..350656c 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
- * "ip" utility frontend.
- *
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
- * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
+ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Bernhard Reutner-Fischer rewrote to use index_in_substr_array
*/
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index d4aa885..acbaa4a 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -15,9 +15,9 @@
/* After libbb.h, because on some systems it needs other includes */
#include <arpa/inet.h>
-#define CLASS_A_NETMASK ntohl(0xFF000000)
-#define CLASS_B_NETMASK ntohl(0xFFFF0000)
-#define CLASS_C_NETMASK ntohl(0xFFFFFF00)
+#define CLASS_A_NETMASK ntohl(0xFF000000)
+#define CLASS_B_NETMASK ntohl(0xFFFF0000)
+#define CLASS_C_NETMASK ntohl(0xFFFFFF00)
static unsigned long get_netmask(unsigned long ipaddr)
{
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c
index bf01528..59c759b 100644
--- a/networking/libiproute/ip_parse_common_args.c
+++ b/networking/libiproute/ip_parse_common_args.c
@@ -1,18 +1,15 @@
/* vi: set sw=4 ts=4: */
/*
- * ip.c "ip" utility frontend.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
- * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
+ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
*/
#include "ip_common.h" /* #include "libbb.h" is inside */
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 1be03a6..397a8ee 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
- * ipaddress.c "ip address".
- *
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
- * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated
+ * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated
*/
#include <fnmatch.h>
@@ -20,7 +18,7 @@
#ifndef IFF_LOWER_UP
/* from linux/if.h */
-#define IFF_LOWER_UP 0x10000 /* driver signals L1 up*/
+#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
#endif
struct filter_t {
@@ -365,7 +363,7 @@ static int FAST_FUNC print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM,
struct nlmsg_list {
struct nlmsg_list *next;
- struct nlmsghdr h;
+ struct nlmsghdr h;
};
static int print_selected_addrinfo(int ifindex, struct nlmsg_list *ainfo)
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index c5ba294..5a86ce6 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -296,9 +296,9 @@ static int do_change(char **argv, const unsigned rtm)
};
struct rtnl_handle rth;
struct {
- struct nlmsghdr n;
- struct ifinfomsg i;
- char buf[1024];
+ struct nlmsghdr n;
+ struct ifinfomsg i;
+ char buf[1024];
} req;
smalluint arg;
char *name_str = NULL, *link_str = NULL, *type_str = NULL, *dev_str = NULL;
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 1696e6a..f66774a 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -1,19 +1,16 @@
/* vi: set sw=4 ts=4: */
/*
- * iproute.c "ip route".
- *
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
- *
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
- * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
+ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized
*/
-#include "ip_common.h" /* #include "libbb.h" is inside */
+#include "ip_common.h" /* #include "libbb.h" is inside */
#include "rt_names.h"
#include "utils.h"
@@ -327,9 +324,9 @@ IF_FEATURE_IP_RULE(ARG_table,)
};
struct rtnl_handle rth;
struct {
- struct nlmsghdr n;
- struct rtmsg r;
- char buf[1024];
+ struct nlmsghdr n;
+ struct rtmsg r;
+ char buf[1024];
} req;
char mxbuf[256];
struct rtattr * mxrta = (void*)mxbuf;
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
index 3af6a83..dd3265c 100644
--- a/networking/libiproute/iprule.c
+++ b/networking/libiproute/iprule.c
@@ -1,18 +1,15 @@
/* vi: set sw=4 ts=4: */
/*
- * iprule.c "ip rule".
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
- * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
+ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
* initially integrated into busybox by Bernhard Reutner-Fischer
*/
@@ -191,9 +188,9 @@ static int iprule_modify(int cmd, char **argv)
bool table_ok = 0;
struct rtnl_handle rth;
struct {
- struct nlmsghdr n;
- struct rtmsg r;
- char buf[1024];
+ struct nlmsghdr n;
+ struct rtmsg r;
+ char buf[1024];
} req;
smalluint key;
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c
index bce373d..5942fea 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -1,16 +1,14 @@
/* vi: set sw=4 ts=4: */
/*
- * iptunnel.c "ip tunnel"
- *
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
- * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
- * Rani Assaf <rani@magic.metawire.com> 980930: do not allow key for ipip/sit
- * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag
+ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
+ * Rani Assaf <rani@magic.metawire.com> 980930: do not allow key for ipip/sit
+ * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag
*/
#include <netinet/ip.h>
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
index 8da80b2..3a37d97 100644
--- a/networking/libiproute/libnetlink.c
+++ b/networking/libiproute/libnetlink.c
@@ -74,8 +74,8 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
struct msghdr msg = {
(void*)&nladdr, sizeof(nladdr),
- iov, 2,
- NULL, 0,
+ iov, 2,
+ NULL, 0,
0
};
@@ -108,8 +108,8 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
struct msghdr msg = {
(void*)&nladdr, sizeof(nladdr),
- &iov, 1,
- NULL, 0,
+ &iov, 1,
+ NULL, 0,
0
};
@@ -214,8 +214,8 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
char *buf = xmalloc(8*1024); /* avoid big stack buffer */
struct msghdr msg = {
(void*)&nladdr, sizeof(nladdr),
- &iov, 1,
- NULL, 0,
+ &iov, 1,
+ NULL, 0,
0
};
diff --git a/networking/libiproute/libnetlink.h b/networking/libiproute/libnetlink.h
index 4e4d5b7..51bee2d 100644
--- a/networking/libiproute/libnetlink.h
+++ b/networking/libiproute/libnetlink.h
@@ -11,11 +11,11 @@
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
struct rtnl_handle {
- int fd;
- struct sockaddr_nl local;
- struct sockaddr_nl peer;
- uint32_t seq;
- uint32_t dump;
+ int fd;
+ struct sockaddr_nl local;
+ struct sockaddr_nl peer;
+ uint32_t seq;
+ uint32_t dump;
};
extern void xrtnl_open(struct rtnl_handle *rth) FAST_FUNC;
diff --git a/networking/libiproute/ll_addr.c b/networking/libiproute/ll_addr.c
index c2c0130..33a54ea 100644
--- a/networking/libiproute/ll_addr.c
+++ b/networking/libiproute/ll_addr.c
@@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
- * ll_addr.c
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include <net/if_arp.h>
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c
index 246b9e3..27cd90f 100644
--- a/networking/libiproute/ll_map.c
+++ b/networking/libiproute/ll_map.c
@@ -1,17 +1,14 @@
/* vi: set sw=4 ts=4: */
/*
- * ll_map.c
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
-#include <net/if.h> /* struct ifreq and co. */
+#include <net/if.h> /* struct ifreq and co. */
#include "libbb.h"
#include "libnetlink.h"
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c
index 1cd576f..04925ec 100644
--- a/networking/libiproute/ll_proto.c
+++ b/networking/libiproute/ll_proto.c
@@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
- * ll_proto.c
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include "libbb.h"
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c
index 3861c28..38b6c05 100644
--- a/networking/libiproute/ll_types.c
+++ b/networking/libiproute/ll_types.c
@@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
- * ll_types.c
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include <arpa/inet.h>
#include <linux/if_arp.h>
diff --git a/networking/libiproute/rt_names.c b/networking/libiproute/rt_names.c
index 8dd16e3..c474ab9 100644
--- a/networking/libiproute/rt_names.c
+++ b/networking/libiproute/rt_names.c
@@ -1,13 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
- * rt_names.c rtnetlink names DB.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include "libbb.h"
#include "rt_names.h"
diff --git a/networking/libiproute/rtm_map.c b/networking/libiproute/rtm_map.c
index 5e358e1..3bab53b 100644
--- a/networking/libiproute/rtm_map.c
+++ b/networking/libiproute/rtm_map.c
@@ -1,14 +1,11 @@
/* vi: set sw=4 ts=4: */
/*
- * rtm_map.c
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include "libbb.h"
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c
index 2b646f0..2469886 100644
--- a/networking/libiproute/utils.c
+++ b/networking/libiproute/utils.c
@@ -4,11 +4,11 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
- * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
- * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
+ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
*/
#include "libbb.h"
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h
index ed03e78..93c9d25 100644
--- a/networking/libiproute/utils.h
+++ b/networking/libiproute/utils.h
@@ -17,14 +17,14 @@ extern smallint oneline;
extern char _SL_;
#ifndef IPPROTO_ESP
-#define IPPROTO_ESP 50
+#define IPPROTO_ESP 50
#endif
#ifndef IPPROTO_AH
-#define IPPROTO_AH 51
+#define IPPROTO_AH 51
#endif
#define SPRINT_BSIZE 64
-#define SPRINT_BUF(x) char x[SPRINT_BSIZE]
+#define SPRINT_BUF(x) char x[SPRINT_BSIZE]
extern void incomplete_command(void) NORETURN;
diff --git a/networking/nameif.c b/networking/nameif.c
index 45a3229..d02c2c1 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -21,10 +21,10 @@
#endif
/* Taken from linux/sockios.h */
-#define SIOCSIFNAME 0x8923 /* set interface name */
+#define SIOCSIFNAME 0x8923 /* set interface name */
/* Octets in one Ethernet addr, from <linux/if_ether.h> */
-#define ETH_ALEN 6
+#define ETH_ALEN 6
#ifndef ifr_newname
#define ifr_newname ifr_ifru.ifru_slave
diff --git a/networking/netstat.c b/networking/netstat.c
index 2a83af3..356fb53 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -699,7 +699,7 @@ int netstat_main(int argc UNUSED_PARAM, char **argv)
flags |= opt;
}
if (flags & (NETSTAT_TCP|NETSTAT_UDP|NETSTAT_RAW)) {
- printf("Active Internet connections "); /* xxx */
+ printf("Active Internet connections "); /* xxx */
if ((flags & (NETSTAT_LISTENING|NETSTAT_CONNECTED)) == (NETSTAT_LISTENING|NETSTAT_CONNECTED))
printf("(servers and established)");
diff --git a/networking/ntpd.c b/networking/ntpd.c
index b7bd239..8fe529e 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -89,7 +89,7 @@
//UNUSED: #define PANIC_THRESHOLD 1000 /* panic threshold (sec) */
#define FREQ_TOLERANCE 0.000015 /* frequency tolerance (15 PPM) */
-#define BURSTPOLL 0 /* initial poll */
+#define BURSTPOLL 0 /* initial poll */
#define MINPOLL 5 /* minimum poll interval. std ntpd uses 6 (6: 64 sec) */
#define BIGPOLL 10 /* drop to lower poll at any trouble (10: 17 min) */
#define MAXPOLL 12 /* maximum poll interval (12: 1.1h, 17: 36.4h). std ntpd uses 17 */
@@ -865,7 +865,7 @@ fit(peer_t *p, double rd)
VERB3 bb_error_msg("peer %s unfit for selection: unreachable", p->p_dotted);
return 0;
}
-#if 0 /* we filter out such packets earlier */
+#if 0 /* we filter out such packets earlier */
if ((p->lastpkt_status & LI_ALARM) == LI_ALARM
|| p->lastpkt_stratum >= MAXSTRAT
) {
@@ -2110,7 +2110,7 @@ direct_freq(double fp_offset)
}
static void
-set_freq(double freq) /* frequency update */
+set_freq(double freq) /* frequency update */
{
char tbuf[80];
diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c
index 5905e54..4ad44e4 100644
--- a/networking/ntpd_simple.c
+++ b/networking/ntpd_simple.c
@@ -870,7 +870,7 @@ static NOINLINE void ntp_init(char **argv)
int prec = 0;
int b;
# if 0
- struct timespec tp;
+ struct timespec tp;
/* We can use sys_clock_getres but assuming 10ms tick should be fine */
clock_getres(CLOCK_REALTIME, &tp);
tp.tv_sec = 0;
diff --git a/networking/slattach.c b/networking/slattach.c
index 921ec55..71edd2f 100644
--- a/networking/slattach.c
+++ b/networking/slattach.c
@@ -134,9 +134,9 @@ int slattach_main(int argc UNUSED_PARAM, char **argv)
int i, encap, opt;
struct termios state;
const char *proto = "cslip";
- const char *extcmd; /* Command to execute after hangup */
+ const char *extcmd; /* Command to execute after hangup */
const char *baud_str;
- int baud_code = -1; /* Line baud rate (system code) */
+ int baud_code = -1; /* Line baud rate (system code) */
enum {
OPT_p_proto = 1 << 0,
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 5c011e1..671529d 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -141,7 +141,7 @@ remove_iacs(struct tsession *ts, int *pnum_totty)
if (ptr[1] == SB && ptr[2] == TELOPT_NAWS) {
struct winsize ws;
if ((ptr+8) >= end)
- break; /* incomplete, can't process */
+ break; /* incomplete, can't process */
ws.ws_col = (ptr[3] << 8) | ptr[4];
ws.ws_row = (ptr[5] << 8) | ptr[6];
ioctl(ts->ptyfd, TIOCSWINSZ, (char *)&ws);
@@ -273,8 +273,8 @@ make_new_session(
static const char iacs_to_send[] ALIGN1 = {
IAC, DO, TELOPT_ECHO,
IAC, DO, TELOPT_NAWS,
- /* This requires telnetd.ctrlSQ.patch (incomplete) */
- /* IAC, DO, TELOPT_LFLOW, */
+ /* This requires telnetd.ctrlSQ.patch (incomplete) */
+ /*IAC, DO, TELOPT_LFLOW,*/
IAC, WILL, TELOPT_ECHO,
IAC, WILL, TELOPT_SGA
};
diff --git a/networking/vconfig.c b/networking/vconfig.c
index 1f574d2..13c65ad 100644
--- a/networking/vconfig.c
+++ b/networking/vconfig.c
@@ -47,8 +47,8 @@ struct vlan_ioctl_args {
short vlan_qos;
};
-#define VLAN_GROUP_ARRAY_LEN 4096
-#define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */
+#define VLAN_GROUP_ARRAY_LEN 4096
+#define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */
/* On entry, table points to the length of the current string
* plus NUL terminator plus data length for the subsequent entry.
diff --git a/networking/wget.c b/networking/wget.c
index 4521abf..0db9b33 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -6,7 +6,7 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*
* Copyright (C) 2010 Bradley M. Kuhn <bkuhn@ebb.org>
- * Kuhn's copyrights are licensed GPLv2-or-later. File as a whole remains GPLv2.
+ * Kuhn's copyrights are licensed GPLv2-or-later. File as a whole remains GPLv2.
*/
#include "libbb.h"
@@ -48,7 +48,7 @@ struct BUG_G_too_big {
/* Must match option string! */
enum {
WGET_OPT_CONTINUE = (1 << 0),
- WGET_OPT_SPIDER = (1 << 1),
+ WGET_OPT_SPIDER = (1 << 1),
WGET_OPT_QUIET = (1 << 2),
WGET_OPT_OUTNAME = (1 << 3),
WGET_OPT_PREFIX = (1 << 4),
@@ -785,7 +785,7 @@ However, in real world it was observed that some web servers
*/
case 204:
break;
- case 300: /* redirection */
+ case 300: /* redirection */
case 301:
case 302:
case 303:
diff --git a/procps/iostat.c b/procps/iostat.c
index 5d82986..a9ff13a 100644
--- a/procps/iostat.c
+++ b/procps/iostat.c
@@ -18,14 +18,14 @@
//config: Report CPU and I/O statistics
#include "libbb.h"
-#include <sys/utsname.h> /* Need struct utsname */
+#include <sys/utsname.h> /* Need struct utsname */
//#define debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
#define debug(fmt, ...) ((void)0)
-#define MAX_DEVICE_NAME 12
-#define CURRENT 0
-#define LAST 1
+#define MAX_DEVICE_NAME 12
+#define CURRENT 0
+#define LAST 1
#if 1
typedef unsigned long long cputime_t;
@@ -327,7 +327,7 @@ static void do_disk_statistics(cputime_t itv)
int i = 0;
char buf[128];
unsigned major, minor;
- unsigned long wr_ops, dummy; /* %*lu for suppres the conversion wouldn't work */
+ unsigned long wr_ops, dummy; /* %*lu for suppress the conversion wouldn't work */
unsigned long long rd_sec_or_wr_ops;
unsigned long long rd_sec_or_dummy, wr_sec_or_dummy, wr_sec;
struct stats_dev sd;
diff --git a/procps/mpstat.c b/procps/mpstat.c
index f1a0b00..25efedf 100644
--- a/procps/mpstat.c
+++ b/procps/mpstat.c
@@ -18,7 +18,7 @@
//config: Per-processor statistics
#include "libbb.h"
-#include <sys/utsname.h> /* struct utsname */
+#include <sys/utsname.h> /* struct utsname */
//#define debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
#define debug(fmt, ...) ((void)0)
@@ -634,7 +634,7 @@ static void get_irqs_from_interrupts(const char *fname,
while (irq < irqs_per_cpu) {
/* Number of interrupts per CPU has changed */
ic = &per_cpu_stats[current][irq];
- ic->irq_name[0] = '\0'; /* False interrupt */
+ ic->irq_name[0] = '\0'; /* False interrupt */
irq++;
}
}
@@ -820,7 +820,7 @@ static int get_irqcpu_nr(const char *f, int max_irqs)
unsigned irq;
fp = fopen_for_read(f);
- if (!fp) /* No interrupts file */
+ if (!fp) /* No interrupts file */
return 0;
linelen = INTERRUPTS_LINE + 16 * G.cpu_nr;
@@ -858,10 +858,10 @@ int mpstat_main(int UNUSED_PARAM argc, char **argv)
char *opt_set_cpu;
int i, opt;
enum {
- OPT_ALL = 1 << 0, /* -A */
- OPT_INTS = 1 << 1, /* -I */
- OPT_SETCPU = 1 << 2, /* -P */
- OPT_UTIL = 1 << 3, /* -u */
+ OPT_ALL = 1 << 0, /* -A */
+ OPT_INTS = 1 << 1, /* -I */
+ OPT_SETCPU = 1 << 2, /* -P */
+ OPT_UTIL = 1 << 3, /* -u */
};
/* Dont buffer data if redirected to a pipe */
diff --git a/procps/sysctl.c b/procps/sysctl.c
index 20b372c..aba966e 100644
--- a/procps/sysctl.c
+++ b/procps/sysctl.c
@@ -91,7 +91,7 @@ static int sysctl_act_on_setting(char *setting)
retval = EXIT_FAILURE;
goto end;
}
- value = cptr + 1; /* point to the value in name=value */
+ value = cptr + 1; /* point to the value in name=value */
if (setting == cptr || !*value) {
bb_error_msg("error: malformed setting '%s'", outname);
retval = EXIT_FAILURE;
diff --git a/selinux/sestatus.c b/selinux/sestatus.c
index 7fb2b47..aa12e80 100644
--- a/selinux/sestatus.c
+++ b/selinux/sestatus.c
@@ -12,10 +12,10 @@
extern char *selinux_mnt;
-#define OPT_VERBOSE (1 << 0)
-#define OPT_BOOLEAN (1 << 1)
+#define OPT_VERBOSE (1 << 0)
+#define OPT_BOOLEAN (1 << 1)
-#define COL_FMT "%-31s "
+#define COL_FMT "%-31s "
static void display_boolean(void)
{
@@ -151,7 +151,7 @@ int sestatus_main(int argc UNUSED_PARAM, char **argv)
const char *pol_path;
int rc;
- opt_complementary = "?0"; /* no arguments are required. */
+ opt_complementary = "?0"; /* no arguments are required. */
opts = getopt32(argv, "vb");
/* SELinux status: line */
diff --git a/shell/ash_test/recho.c b/shell/ash_test/recho.c
index fb48d9c..42a5fea 100644
--- a/shell/ash_test/recho.c
+++ b/shell/ash_test/recho.c
@@ -29,12 +29,9 @@
void strprint();
-int
-main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
- register int i;
+ int i;
for (i = 1; i < argc; i++) {
printf("argv[%d] = <", i);
@@ -44,11 +41,9 @@ char **argv;
exit(EXIT_SUCCESS);
}
-void
-strprint(str)
-char *str;
+void strprint(char *str)
{
- register unsigned char *s;
+ unsigned char *s;
for (s = (unsigned char *)str; s && *s; s++) {
if (*s < ' ') {
diff --git a/shell/ash_test/zecho.c b/shell/ash_test/zecho.c
index bf876f6..cbaa59b 100644
--- a/shell/ash_test/zecho.c
+++ b/shell/ash_test/zecho.c
@@ -21,10 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
-int
-main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
argv++;
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 07c8f55..77cc1fc 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -26,7 +26,7 @@ enum {
struct fb_bitfield {
uint32_t offset; /* beginning of bitfield */
- uint32_t length; /* length of bitfield */
+ uint32_t length; /* length of bitfield */
uint32_t msb_right; /* !=0: Most significant bit is right */
};
struct fb_var_screeninfo {
@@ -52,7 +52,7 @@ struct fb_var_screeninfo {
uint32_t height; /* height of picture in mm */
uint32_t width; /* width of picture in mm */
- uint32_t accel_flags; /* acceleration flags (hints) */
+ uint32_t accel_flags; /* acceleration flags (hints) */
/* Timing: All values in pixclocks, except pixclock (of course) */
uint32_t pixclock; /* pixel clock in ps (pico seconds) */
@@ -317,7 +317,7 @@ static int read_mode_db(struct fb_var_screeninfo *base, const char *fn,
}
case 4:
case 5:
- case 6: {
+ case 6: {
static const uint32_t syncs[] = {FB_SYNC_VERT_HIGH_ACT, FB_SYNC_HOR_HIGH_ACT, FB_SYNC_COMP_HIGH_ACT};
ss(&base->sync, syncs[i-4], p, "low");
//bb_info_msg("SYNC[%s]", p);
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 8c4d521..a38fe05 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -4,7 +4,7 @@
* Based on code from util-linux v 2.11l
*
* Copyright (c) 1989
- * The Regents of the University of California. All rights reserved.
+ * The Regents of the University of California. All rights reserved.
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
@@ -32,11 +32,11 @@ static void bb_dump_addfile(dumper_t *dumper, char *name)
}
static const char *const add_strings[] = {
- "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */
- "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */
- "\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */
- "\"%07.7_ax \" 8/2 \" %06o \" \"\\n\"", /* o */
- "\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */
+ "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", /* b */
+ "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", /* c */
+ "\"%07.7_ax \" 8/2 \" %05u \" \"\\n\"", /* d */
+ "\"%07.7_ax \" 8/2 \" %06o \" \"\\n\"", /* o */
+ "\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", /* x */
};
static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\"";