aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-16 22:32:04 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-16 22:32:04 +0000
commitac678ec2f127fc02a93fff2c164e0b13a94a6abf (patch)
treef1354d1d4e3ca29b1fd77698d45791e61fd7a8b1
parent17e3c34aa7abe42aa604234235338e2b8087b8a0 (diff)
downloadbusybox-w32-ac678ec2f127fc02a93fff2c164e0b13a94a6abf.tar.gz
busybox-w32-ac678ec2f127fc02a93fff2c164e0b13a94a6abf.tar.bz2
busybox-w32-ac678ec2f127fc02a93fff2c164e0b13a94a6abf.zip
style fixes, no code changes
-rw-r--r--archival/dpkg.c3
-rw-r--r--archival/rpm.c3
-rw-r--r--coreutils/install.c3
-rw-r--r--coreutils/tail.c3
-rw-r--r--include/platform.h3
-rw-r--r--miscutils/chrt.c3
-rw-r--r--miscutils/hdparm.c3
-rw-r--r--miscutils/rx.c3
-rw-r--r--modutils/modprobe.c3
-rw-r--r--procps/top.c3
-rw-r--r--runit/sv.c15
-rw-r--r--runit/svlogd.c3
-rw-r--r--shell/hush.c3
13 files changed, 34 insertions, 17 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index c5deb0f71..7d31ad12e 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -352,7 +352,8 @@ static int search_package_hashtable(const unsigned name, const unsigned version,
352 * FIXME: I don't think this is very efficient, but I thought I'd keep 352 * FIXME: I don't think this is very efficient, but I thought I'd keep
353 * it simple for now until it proves to be a problem. 353 * it simple for now until it proves to be a problem.
354 */ 354 */
355static int search_for_provides(int needle, int start_at) { 355static int search_for_provides(int needle, int start_at)
356{
356 int i, j; 357 int i, j;
357 common_node_t *p; 358 common_node_t *p;
358 for (i = start_at + 1; i < PACKAGE_HASH_PRIME; i++) { 359 for (i = start_at + 1; i < PACKAGE_HASH_PRIME; i++) {
diff --git a/archival/rpm.c b/archival/rpm.c
index a48dda3bc..654a4a381 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -185,7 +185,8 @@ int rpm_main(int argc, char **argv)
185 return 0; 185 return 0;
186} 186}
187 187
188static void extract_cpio_gz(int fd) { 188static void extract_cpio_gz(int fd)
189{
189 archive_handle_t *archive_handle; 190 archive_handle_t *archive_handle;
190 unsigned char magic[2]; 191 unsigned char magic[2];
191 192
diff --git a/coreutils/install.c b/coreutils/install.c
index c80be01ff..ece5b955b 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -35,7 +35,8 @@ static const struct option install_long_options[] = {
35#if ENABLE_SELINUX 35#if ENABLE_SELINUX
36static bool use_default_selinux_context = 1; 36static bool use_default_selinux_context = 1;
37 37
38static void setdefaultfilecon(const char *path) { 38static void setdefaultfilecon(const char *path)
39{
39 struct stat s; 40 struct stat s;
40 security_context_t scontext = NULL; 41 security_context_t scontext = NULL;
41 42
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 67396ab1c..629ee2125 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -65,7 +65,8 @@ static ssize_t tail_read(int fd, char *buf, size_t count)
65 65
66static const char header_fmt[] = "\n==> %s <==\n"; 66static const char header_fmt[] = "\n==> %s <==\n";
67 67
68static unsigned eat_num(const char *p) { 68static unsigned eat_num(const char *p)
69{
69 if (*p == '-') p++; 70 if (*p == '-') p++;
70 else if (*p == '+') { p++; G.status = EXIT_FAILURE; } 71 else if (*p == '+') { p++; G.status = EXIT_FAILURE; }
71 return xatou_sfx(p, tail_suffixes); 72 return xatou_sfx(p, tail_suffixes);
diff --git a/include/platform.h b/include/platform.h
index 0adbed4e7..ad3cc9332 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -234,7 +234,8 @@ typedef unsigned smalluint;
234#endif 234#endif
235 235
236#if defined(__dietlibc__) 236#if defined(__dietlibc__)
237static ATTRIBUTE_ALWAYS_INLINE char* strchrnul(const char *s, char c) { 237static ATTRIBUTE_ALWAYS_INLINE char* strchrnul(const char *s, char c)
238{
238 while (*s && *s != c) ++s; 239 while (*s && *s != c) ++s;
239 return (char*)s; 240 return (char*)s;
240} 241}
diff --git a/miscutils/chrt.c b/miscutils/chrt.c
index 75d77d536..f52c3cd1b 100644
--- a/miscutils/chrt.c
+++ b/miscutils/chrt.c
@@ -22,7 +22,8 @@ static const struct {
22 {SCHED_RR, "SCHED_RR"} 22 {SCHED_RR, "SCHED_RR"}
23}; 23};
24 24
25static void show_min_max(int pol) { 25static void show_min_max(int pol)
26{
26 const char *fmt = "%s min/max priority\t: %d/%d\n\0%s not supported?\n"; 27 const char *fmt = "%s min/max priority\t: %d/%d\n\0%s not supported?\n";
27 int max, min; 28 int max, min;
28 max = sched_get_priority_max(pol); 29 max = sched_get_priority_max(pol);
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index cc33a010a..c540ff93c 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -517,7 +517,8 @@ static uint8_t mode_loop(uint16_t mode_sup, uint16_t mode_sel, int cc, uint8_t *
517 return err_dma; 517 return err_dma;
518} 518}
519 519
520static void print_ascii(uint16_t *p, uint8_t length) { 520static void print_ascii(uint16_t *p, uint8_t length)
521{
521 uint8_t ii; 522 uint8_t ii;
522 char cl; 523 char cl;
523 524
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 29848b1d9..6e79f3438 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -43,7 +43,8 @@ Cf:
43#define TIMEOUT_LONG 10 43#define TIMEOUT_LONG 10
44#define MAXERRORS 10 44#define MAXERRORS 10
45 45
46static int read_byte(int fd, unsigned int timeout) { 46static int read_byte(int fd, unsigned int timeout)
47{
47 char buf[1]; 48 char buf[1];
48 int n; 49 int n;
49 50
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index d6a9553d5..4c5e43656 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -669,7 +669,8 @@ static int mod_process(const struct mod_list_t *list, int do_insert)
669 * Check the matching between a pattern and a module name. 669 * Check the matching between a pattern and a module name.
670 * We need this as *_* is equivalent to *-*, even in pattern matching. 670 * We need this as *_* is equivalent to *-*, even in pattern matching.
671 */ 671 */
672static int check_pattern(const char* pat_src, const char* mod_src) { 672static int check_pattern(const char* pat_src, const char* mod_src)
673{
673 int ret; 674 int ret;
674 675
675 if (ENABLE_FEATURE_MODPROBE_FANCY_ALIAS) { 676 if (ENABLE_FEATURE_MODPROBE_FANCY_ALIAS) {
diff --git a/procps/top.c b/procps/top.c
index ee6ee5d5c..7d30936a8 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -103,7 +103,8 @@ static int time_sort(top_status_t *P, top_status_t *Q)
103 return Q->ticks != P->ticks; /* 0 if ==, 1 if > */ 103 return Q->ticks != P->ticks; /* 0 if ==, 1 if > */
104} 104}
105 105
106static int mult_lvl_cmp(void* a, void* b) { 106static int mult_lvl_cmp(void* a, void* b)
107{
107 int i, cmp_val; 108 int i, cmp_val;
108 109
109 for (i = 0; i < SORT_DEPTH; i++) { 110 for (i = 0; i < SORT_DEPTH; i++) {
diff --git a/runit/sv.c b/runit/sv.c
index d52eb6d22..01488c060 100644
--- a/runit/sv.c
+++ b/runit/sv.c
@@ -183,23 +183,28 @@ static void out(const char *p, const char *m1)
183#define WARN "warning: " 183#define WARN "warning: "
184#define OK "ok: " 184#define OK "ok: "
185 185
186static void fail(const char *m1) { 186static void fail(const char *m1)
187{
187 ++rc; 188 ++rc;
188 out("fail: ", m1); 189 out("fail: ", m1);
189} 190}
190static void failx(const char *m1) { 191static void failx(const char *m1)
192{
191 errno = 0; 193 errno = 0;
192 fail(m1); 194 fail(m1);
193} 195}
194static void warn_cannot(const char *m1) { 196static void warn_cannot(const char *m1)
197{
195 ++rc; 198 ++rc;
196 out("warning: cannot ", m1); 199 out("warning: cannot ", m1);
197} 200}
198static void warnx_cannot(const char *m1) { 201static void warnx_cannot(const char *m1)
202{
199 errno = 0; 203 errno = 0;
200 warn_cannot(m1); 204 warn_cannot(m1);
201} 205}
202static void ok(const char *m1) { 206static void ok(const char *m1)
207{
203 errno = 0; 208 errno = 0;
204 out(OK, m1); 209 out(OK, m1);
205} 210}
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 1d6625561..c2cff9679 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -92,7 +92,8 @@ static void fatalx(const char *m0)
92{ 92{
93 bb_error_msg_and_die(FATAL"%s", m0); 93 bb_error_msg_and_die(FATAL"%s", m0);
94} 94}
95static void warn(const char *m0) { 95static void warn(const char *m0)
96{
96 bb_perror_msg(WARNING"%s", m0); 97 bb_perror_msg(WARNING"%s", m0);
97} 98}
98static void warn2(const char *m0, const char *m1) 99static void warn2(const char *m0, const char *m1)
diff --git a/shell/hush.c b/shell/hush.c
index 0b5e2a5de..9489fb276 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1953,7 +1953,8 @@ static int setup_redirect(struct p_context *ctx, int fd, redir_type style,
1953 return 0; 1953 return 0;
1954} 1954}
1955 1955
1956static struct pipe *new_pipe(void) { 1956static struct pipe *new_pipe(void)
1957{
1957 struct pipe *pi; 1958 struct pipe *pi;
1958 pi = xmalloc(sizeof(struct pipe)); 1959 pi = xmalloc(sizeof(struct pipe));
1959 pi->num_progs = 0; 1960 pi->num_progs = 0;