diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-24 15:40:16 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-24 15:40:16 +0000 |
commit | 219d14d514ca4d31b4319af14e3a64b66fe2c233 (patch) | |
tree | a74e8ce7604ff932a3990de3065c167392e4b082 | |
parent | 644849a3aa0c834a942fb7777ec449d8098bcfc9 (diff) | |
download | busybox-w32-219d14d514ca4d31b4319af14e3a64b66fe2c233.tar.gz busybox-w32-219d14d514ca4d31b4319af14e3a64b66fe2c233.tar.bz2 busybox-w32-219d14d514ca4d31b4319af14e3a64b66fe2c233.zip |
random style fixes (extra spaces deleted)
-rw-r--r-- | editors/vi.c | 2 | ||||
-rw-r--r-- | init/init.c | 3 | ||||
-rw-r--r-- | libbb/bb_pwd.c | 2 | ||||
-rw-r--r-- | libbb/human_readable.c | 4 | ||||
-rw-r--r-- | networking/telnet.c | 2 | ||||
-rw-r--r-- | networking/udhcp/arpping.c | 6 | ||||
-rw-r--r-- | procps/free.c | 7 | ||||
-rw-r--r-- | shell/hush.c | 4 | ||||
-rw-r--r-- | shell/lash.c | 4 | ||||
-rw-r--r-- | util-linux/fdisk_sgi.c | 2 | ||||
-rw-r--r-- | util-linux/hwclock.c | 4 |
11 files changed, 20 insertions, 20 deletions
diff --git a/editors/vi.c b/editors/vi.c index 853303249..c7582bfe0 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -3393,7 +3393,7 @@ static void do_cmd(char c) | |||
3393 | editing = 0; | 3393 | editing = 0; |
3394 | } | 3394 | } |
3395 | } | 3395 | } |
3396 | } else if (strncasecmp(p, "file", cnt) == 0 ) { | 3396 | } else if (strncasecmp(p, "file", cnt) == 0) { |
3397 | last_status_cksum = 0; // force status update | 3397 | last_status_cksum = 0; // force status update |
3398 | } else if (sscanf(p, "%d", &j) > 0) { | 3398 | } else if (sscanf(p, "%d", &j) > 0) { |
3399 | dot = find_line(j); // go to line # j | 3399 | dot = find_line(j); // go to line # j |
diff --git a/init/init.c b/init/init.c index 02a33274a..8c32b7791 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -880,8 +880,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED) | |||
880 | /* remove unused entrys */ | 880 | /* remove unused entrys */ |
881 | for (a = init_action_list; a; a = tmp) { | 881 | for (a = init_action_list; a; a = tmp) { |
882 | tmp = a->next; | 882 | tmp = a->next; |
883 | if (a->action & (ONCE | SYSINIT | WAIT ) && | 883 | if ((a->action & (ONCE | SYSINIT | WAIT)) && a->pid == 0) { |
884 | a->pid == 0 ) { | ||
885 | delete_init_action(a); | 884 | delete_init_action(a); |
886 | } | 885 | } |
887 | } | 886 | } |
diff --git a/libbb/bb_pwd.c b/libbb/bb_pwd.c index 223a6b44c..3af1994d5 100644 --- a/libbb/bb_pwd.c +++ b/libbb/bb_pwd.c | |||
@@ -28,7 +28,7 @@ | |||
28 | /* internal function for bb_getpwuid and bb_getgrgid */ | 28 | /* internal function for bb_getpwuid and bb_getgrgid */ |
29 | static char* bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix) | 29 | static char* bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix) |
30 | { | 30 | { |
31 | if (bufsize > 0 ) { | 31 | if (bufsize > 0) { |
32 | assert(buffer != NULL); | 32 | assert(buffer != NULL); |
33 | if (idname) { | 33 | if (idname) { |
34 | return safe_strncpy(buffer, idname, bufsize); | 34 | return safe_strncpy(buffer, idname, bufsize); |
diff --git a/libbb/human_readable.c b/libbb/human_readable.c index ff1b55141..7469e7999 100644 --- a/libbb/human_readable.c +++ b/libbb/human_readable.c | |||
@@ -72,8 +72,8 @@ const char *make_human_readable_str(unsigned long long size, | |||
72 | } | 72 | } |
73 | #if 0 | 73 | #if 0 |
74 | /* Sample code to omit decimal point and tenths digit. */ | 74 | /* Sample code to omit decimal point and tenths digit. */ |
75 | if ( /* no_tenths */ 1 ) { | 75 | if (/* no_tenths */ 1) { |
76 | if ( frac >= 5 ) { | 76 | if (frac >= 5) { |
77 | ++val; | 77 | ++val; |
78 | } | 78 | } |
79 | f = "%llu%*c" /* fmt_no_tenths */ ; | 79 | f = "%llu%*c" /* fmt_no_tenths */ ; |
diff --git a/networking/telnet.c b/networking/telnet.c index cd88a9b3d..5c75a7409 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -188,7 +188,7 @@ static void handlenetoutput(int len) | |||
188 | else if (*p == 0x0d) | 188 | else if (*p == 0x0d) |
189 | outbuf[j++] = 0x00; | 189 | outbuf[j++] = 0x00; |
190 | } | 190 | } |
191 | if (j > 0 ) | 191 | if (j > 0) |
192 | write(G.netfd, outbuf, j); | 192 | write(G.netfd, outbuf, j); |
193 | } | 193 | } |
194 | 194 | ||
diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index f78fd3fd8..615a91172 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c | |||
@@ -94,9 +94,11 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface) | |||
94 | tm.tv_sec = timeout; | 94 | tm.tv_sec = timeout; |
95 | if (select(s + 1, &fdset, (fd_set *) NULL, (fd_set *) NULL, &tm) < 0) { | 95 | if (select(s + 1, &fdset, (fd_set *) NULL, (fd_set *) NULL, &tm) < 0) { |
96 | bb_perror_msg("error on ARPING request"); | 96 | bb_perror_msg("error on ARPING request"); |
97 | if (errno != EINTR) rv = 0; | 97 | if (errno != EINTR) |
98 | rv = 0; | ||
98 | } else if (FD_ISSET(s, &fdset)) { | 99 | } else if (FD_ISSET(s, &fdset)) { |
99 | if (recv(s, &arp, sizeof(arp), 0) < 0 ) rv = 0; | 100 | if (recv(s, &arp, sizeof(arp), 0) < 0) |
101 | rv = 0; | ||
100 | if (arp.operation == htons(ARPOP_REPLY) && | 102 | if (arp.operation == htons(ARPOP_REPLY) && |
101 | memcmp(arp.tHaddr, mac, 6) == 0 && | 103 | memcmp(arp.tHaddr, mac, 6) == 0 && |
102 | *((uint32_t *) arp.sInaddr) == yiaddr) { | 104 | *((uint32_t *) arp.sInaddr) == yiaddr) { |
diff --git a/procps/free.c b/procps/free.c index 860f57347..2b205d0c7 100644 --- a/procps/free.c +++ b/procps/free.c | |||
@@ -18,10 +18,10 @@ int free_main(int argc, char **argv) | |||
18 | sysinfo(&info); | 18 | sysinfo(&info); |
19 | 19 | ||
20 | /* Kernels prior to 2.4.x will return info.mem_unit==0, so cope... */ | 20 | /* Kernels prior to 2.4.x will return info.mem_unit==0, so cope... */ |
21 | if (info.mem_unit==0) { | 21 | if (info.mem_unit == 0) { |
22 | info.mem_unit=1; | 22 | info.mem_unit=1; |
23 | } | 23 | } |
24 | if ( info.mem_unit == 1 ) { | 24 | if (info.mem_unit == 1) { |
25 | info.mem_unit=1024; | 25 | info.mem_unit=1024; |
26 | 26 | ||
27 | /* TODO: Make all this stuff not overflow when mem >= 4 Gib */ | 27 | /* TODO: Make all this stuff not overflow when mem >= 4 Gib */ |
@@ -46,7 +46,7 @@ int free_main(int argc, char **argv) | |||
46 | info.bufferram*=info.mem_unit; | 46 | info.bufferram*=info.mem_unit; |
47 | } | 47 | } |
48 | 48 | ||
49 | if (argc > 1 && **(argv + 1) == '-') | 49 | if (argc > 1 && *argv[1] == '-') |
50 | bb_show_usage(); | 50 | bb_show_usage(); |
51 | 51 | ||
52 | printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free", | 52 | printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free", |
@@ -66,4 +66,3 @@ int free_main(int argc, char **argv) | |||
66 | #endif | 66 | #endif |
67 | return EXIT_SUCCESS; | 67 | return EXIT_SUCCESS; |
68 | } | 68 | } |
69 | |||
diff --git a/shell/hush.c b/shell/hush.c index 7658aebed..5bc83bc41 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -1095,7 +1095,7 @@ static void pseudo_exec(struct child_prog *child) | |||
1095 | * if this is one of those cases. | 1095 | * if this is one of those cases. |
1096 | */ | 1096 | */ |
1097 | for (x = bltins; x->cmd; x++) { | 1097 | for (x = bltins; x->cmd; x++) { |
1098 | if (strcmp(child->argv[0], x->cmd) == 0 ) { | 1098 | if (strcmp(child->argv[0], x->cmd) == 0) { |
1099 | debug_printf("builtin exec %s\n", child->argv[0]); | 1099 | debug_printf("builtin exec %s\n", child->argv[0]); |
1100 | rcode = x->function(child); | 1100 | rcode = x->function(child); |
1101 | fflush(stdout); | 1101 | fflush(stdout); |
@@ -1369,7 +1369,7 @@ static int run_pipe_real(struct pipe *pi) | |||
1369 | return last_return_code; | 1369 | return last_return_code; |
1370 | } | 1370 | } |
1371 | for (x = bltins; x->cmd; x++) { | 1371 | for (x = bltins; x->cmd; x++) { |
1372 | if (strcmp(child->argv[i], x->cmd) == 0 ) { | 1372 | if (strcmp(child->argv[i], x->cmd) == 0) { |
1373 | int squirrel[] = { -1, -1, -1 }; | 1373 | int squirrel[] = { -1, -1, -1 }; |
1374 | int rcode; | 1374 | int rcode; |
1375 | if (x->function == builtin_exec && child->argv[i+1] == NULL) { | 1375 | if (x->function == builtin_exec && child->argv[i+1] == NULL) { |
diff --git a/shell/lash.c b/shell/lash.c index 09067fda0..f938a74b9 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -1138,7 +1138,7 @@ static int pseudo_exec(struct child_prog *child) | |||
1138 | * if this is one of those cases. | 1138 | * if this is one of those cases. |
1139 | */ | 1139 | */ |
1140 | for (x = bltins; x->cmd; x++) { | 1140 | for (x = bltins; x->cmd; x++) { |
1141 | if (strcmp(child->argv[0], x->cmd) == 0 ) { | 1141 | if (strcmp(child->argv[0], x->cmd) == 0) { |
1142 | _exit(x->function(child)); | 1142 | _exit(x->function(child)); |
1143 | } | 1143 | } |
1144 | } | 1144 | } |
@@ -1262,7 +1262,7 @@ static int run_command(struct job *newjob, int inbg, int outpipe[2]) | |||
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | for (x = bltins; x->cmd; x++) { | 1264 | for (x = bltins; x->cmd; x++) { |
1265 | if (strcmp(child->argv[0], x->cmd) == 0 ) { | 1265 | if (strcmp(child->argv[0], x->cmd) == 0) { |
1266 | int rcode; | 1266 | int rcode; |
1267 | int squirrel[] = {-1, -1, -1}; | 1267 | int squirrel[] = {-1, -1, -1}; |
1268 | setup_redirects(child, squirrel); | 1268 | setup_redirects(child, squirrel); |
diff --git a/util-linux/fdisk_sgi.c b/util-linux/fdisk_sgi.c index b2e0d7a62..b7e09f3c2 100644 --- a/util-linux/fdisk_sgi.c +++ b/util-linux/fdisk_sgi.c | |||
@@ -613,7 +613,7 @@ sgi_gaps(void) | |||
613 | static void | 613 | static void |
614 | sgi_change_sysid(int i, int sys) | 614 | sgi_change_sysid(int i, int sys) |
615 | { | 615 | { |
616 | if (sgi_get_num_sectors(i) == 0 ) { /* caught already before, ... */ | 616 | if (sgi_get_num_sectors(i) == 0) { /* caught already before, ... */ |
617 | printf("Sorry you may change the Tag of non-empty partitions\n"); | 617 | printf("Sorry you may change the Tag of non-empty partitions\n"); |
618 | return; | 618 | return; |
619 | } | 619 | } |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 86235e989..4ca8eafad 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -61,7 +61,7 @@ static time_t read_rtc(int utc) | |||
61 | int rtc = xopen_rtc(O_RDONLY); | 61 | int rtc = xopen_rtc(O_RDONLY); |
62 | 62 | ||
63 | memset(&tm, 0, sizeof(struct tm)); | 63 | memset(&tm, 0, sizeof(struct tm)); |
64 | if (ioctl(rtc, RTC_RD_TIME, &tm) < 0 ) | 64 | if (ioctl(rtc, RTC_RD_TIME, &tm) < 0) |
65 | bb_perror_msg_and_die("cannot read time from RTC"); | 65 | bb_perror_msg_and_die("cannot read time from RTC"); |
66 | tm.tm_isdst = -1; /* not known */ | 66 | tm.tm_isdst = -1; /* not known */ |
67 | 67 | ||
@@ -165,7 +165,7 @@ static int check_utc(void) | |||
165 | 165 | ||
166 | buffer[len] = 0; | 166 | buffer[len] = 0; |
167 | 167 | ||
168 | if (strncmp(buffer, "UTC", 3) == 0 ) { | 168 | if (strncmp(buffer, "UTC", 3) == 0) { |
169 | utc = 1; | 169 | utc = 1; |
170 | break; | 170 | break; |
171 | } | 171 | } |