aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-27 16:49:31 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-27 16:49:31 +0000
commitbb89b301143fe9deb962bb2d48264b27a945fcf4 (patch)
tree0d8cba8e45b1a8b975e0b8c7a8377703ab5547a6
parent09d6cecd11b71856abab9bb68e74f0dd87a425fa (diff)
downloadbusybox-w32-bb89b301143fe9deb962bb2d48264b27a945fcf4.tar.gz
busybox-w32-bb89b301143fe9deb962bb2d48264b27a945fcf4.tar.bz2
busybox-w32-bb89b301143fe9deb962bb2d48264b27a945fcf4.zip
style cleanup: return(a) -> return a, part 1
git-svn-id: svn://busybox.net/trunk/busybox@16690 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--archival/cpio.c2
-rw-r--r--archival/dpkg_deb.c4
-rw-r--r--archival/libunarchive/decompress_unzip.c2
-rw-r--r--archival/libunarchive/filter_accept_all.c8
-rw-r--r--archival/libunarchive/filter_accept_list.c8
-rw-r--r--archival/libunarchive/filter_accept_list_reassign.c8
-rw-r--r--archival/libunarchive/filter_accept_reject_list.c6
-rw-r--r--archival/libunarchive/get_header_ar.c4
-rw-r--r--coreutils/diff.c30
-rw-r--r--coreutils/install.c4
-rw-r--r--coreutils/sync.c2
-rw-r--r--coreutils/test.c16
-rw-r--r--coreutils/tr.c2
-rw-r--r--debianutils/run_parts.c2
-rw-r--r--e2fsprogs/blkid/dev.c2
-rw-r--r--e2fsprogs/blkid/devname.c2
-rw-r--r--e2fsprogs/blkid/probe.c4
-rw-r--r--e2fsprogs/blkid/tag.c4
-rw-r--r--e2fsprogs/e2fsck.c8
-rw-r--r--e2fsprogs/ext2fs/icount.c2
-rw-r--r--e2fsprogs/fsck.c2
-rw-r--r--e2fsprogs/uuid/compare.c2
-rw-r--r--editors/patch.c8
-rw-r--r--editors/vi.c50
-rw-r--r--libbb/dump.c6
-rw-r--r--libbb/obscure.c2
-rw-r--r--miscutils/devfsd.c18
-rw-r--r--modutils/insmod.c11
-rw-r--r--modutils/lsmod.c2
-rw-r--r--modutils/rmmod.c6
-rw-r--r--networking/ftpgetput.c8
-rw-r--r--shell/ash.c11
-rw-r--r--shell/cmdedit.c3
-rw-r--r--shell/hush.c4
-rw-r--r--shell/msh.c178
-rw-r--r--util-linux/rdate.c2
36 files changed, 214 insertions, 219 deletions
diff --git a/archival/cpio.c b/archival/cpio.c
index 751e87952..73651ba10 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -82,5 +82,5 @@ int cpio_main(int argc, char **argv)
82 82
83 while (get_header_cpio(archive_handle) == EXIT_SUCCESS); 83 while (get_header_cpio(archive_handle) == EXIT_SUCCESS);
84 84
85 return(EXIT_SUCCESS); 85 return EXIT_SUCCESS;
86} 86}
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 80a5f3250..d11d9df17 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -90,7 +90,7 @@ int dpkg_deb_main(int argc, char **argv)
90 unpack_ar_archive(ar_archive); 90 unpack_ar_archive(ar_archive);
91 91
92 /* Cleanup */ 92 /* Cleanup */
93 close (ar_archive->src_fd); 93 close(ar_archive->src_fd);
94 94
95 return(EXIT_SUCCESS); 95 return EXIT_SUCCESS;
96} 96}
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index 9e3e98dd5..621d84c2d 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -123,7 +123,7 @@ static unsigned int fill_bitbuffer(unsigned int bitbuffer, unsigned int *current
123 bytebuffer_offset++; 123 bytebuffer_offset++;
124 *current += 8; 124 *current += 8;
125 } 125 }
126 return(bitbuffer); 126 return bitbuffer;
127} 127}
128 128
129/* 129/*
diff --git a/archival/libunarchive/filter_accept_all.c b/archival/libunarchive/filter_accept_all.c
index e2ff06d51..5c991cac4 100644
--- a/archival/libunarchive/filter_accept_all.c
+++ b/archival/libunarchive/filter_accept_all.c
@@ -11,9 +11,7 @@
11/* Accept any non-null name, its not really a filter at all */ 11/* Accept any non-null name, its not really a filter at all */
12char filter_accept_all(archive_handle_t *archive_handle) 12char filter_accept_all(archive_handle_t *archive_handle)
13{ 13{
14 if (archive_handle->file_header->name) { 14 if (archive_handle->file_header->name)
15 return(EXIT_SUCCESS); 15 return EXIT_SUCCESS;
16 } else { 16 return EXIT_FAILURE;
17 return(EXIT_FAILURE);
18 }
19} 17}
diff --git a/archival/libunarchive/filter_accept_list.c b/archival/libunarchive/filter_accept_list.c
index 253021a86..cfc1b0c58 100644
--- a/archival/libunarchive/filter_accept_list.c
+++ b/archival/libunarchive/filter_accept_list.c
@@ -13,9 +13,7 @@
13 */ 13 */
14char filter_accept_list(archive_handle_t *archive_handle) 14char filter_accept_list(archive_handle_t *archive_handle)
15{ 15{
16 if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) { 16 if (find_list_entry(archive_handle->accept, archive_handle->file_header->name))
17 return(EXIT_SUCCESS); 17 return EXIT_SUCCESS;
18 } else { 18 return EXIT_FAILURE;
19 return(EXIT_FAILURE);
20 }
21} 19}
diff --git a/archival/libunarchive/filter_accept_list_reassign.c b/archival/libunarchive/filter_accept_list_reassign.c
index c26f2e036..04b678007 100644
--- a/archival/libunarchive/filter_accept_list_reassign.c
+++ b/archival/libunarchive/filter_accept_list_reassign.c
@@ -30,19 +30,19 @@ char filter_accept_list_reassign(archive_handle_t *archive_handle)
30#ifdef CONFIG_FEATURE_DEB_TAR_GZ 30#ifdef CONFIG_FEATURE_DEB_TAR_GZ
31 if (strcmp(name_ptr, ".gz") == 0) { 31 if (strcmp(name_ptr, ".gz") == 0) {
32 archive_handle->action_data_subarchive = get_header_tar_gz; 32 archive_handle->action_data_subarchive = get_header_tar_gz;
33 return(EXIT_SUCCESS); 33 return EXIT_SUCCESS;
34 } 34 }
35#endif 35#endif
36#ifdef CONFIG_FEATURE_DEB_TAR_BZ2 36#ifdef CONFIG_FEATURE_DEB_TAR_BZ2
37 if (strcmp(name_ptr, ".bz2") == 0) { 37 if (strcmp(name_ptr, ".bz2") == 0) {
38 archive_handle->action_data_subarchive = get_header_tar_bz2; 38 archive_handle->action_data_subarchive = get_header_tar_bz2;
39 return(EXIT_SUCCESS); 39 return EXIT_SUCCESS;
40 } 40 }
41#endif 41#endif
42 if (ENABLE_FEATURE_DEB_TAR_LZMA && !strcmp(name_ptr, ".lzma")) { 42 if (ENABLE_FEATURE_DEB_TAR_LZMA && !strcmp(name_ptr, ".lzma")) {
43 archive_handle->action_data_subarchive = get_header_tar_lzma; 43 archive_handle->action_data_subarchive = get_header_tar_lzma;
44 return(EXIT_SUCCESS); 44 return EXIT_SUCCESS;
45 } 45 }
46 } 46 }
47 return(EXIT_FAILURE); 47 return EXIT_FAILURE;
48} 48}
diff --git a/archival/libunarchive/filter_accept_reject_list.c b/archival/libunarchive/filter_accept_reject_list.c
index a3a938c62..79da350b6 100644
--- a/archival/libunarchive/filter_accept_reject_list.c
+++ b/archival/libunarchive/filter_accept_reject_list.c
@@ -19,15 +19,15 @@ char filter_accept_reject_list(archive_handle_t *archive_handle)
19 19
20 /* If the key is in a reject list fail */ 20 /* If the key is in a reject list fail */
21 if (reject_entry) { 21 if (reject_entry) {
22 return(EXIT_FAILURE); 22 return EXIT_FAILURE;
23 } 23 }
24 accept_entry = find_list_entry2(archive_handle->accept, key); 24 accept_entry = find_list_entry2(archive_handle->accept, key);
25 25
26 /* Fail if an accept list was specified and the key wasnt in there */ 26 /* Fail if an accept list was specified and the key wasnt in there */
27 if ((accept_entry == NULL) && archive_handle->accept) { 27 if ((accept_entry == NULL) && archive_handle->accept) {
28 return(EXIT_FAILURE); 28 return EXIT_FAILURE;
29 } 29 }
30 30
31 /* Accepted */ 31 /* Accepted */
32 return(EXIT_SUCCESS); 32 return EXIT_SUCCESS;
33} 33}
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c
index 0d040e30b..d0791e99c 100644
--- a/archival/libunarchive/get_header_ar.c
+++ b/archival/libunarchive/get_header_ar.c
@@ -30,7 +30,7 @@ char get_header_ar(archive_handle_t *archive_handle)
30 /* dont use xread as we want to handle the error ourself */ 30 /* dont use xread as we want to handle the error ourself */
31 if (read(archive_handle->src_fd, ar.raw, 60) != 60) { 31 if (read(archive_handle->src_fd, ar.raw, 60) != 60) {
32 /* End Of File */ 32 /* End Of File */
33 return(EXIT_FAILURE); 33 return EXIT_FAILURE;
34 } 34 }
35 35
36 /* ar header starts on an even byte (2 byte aligned) 36 /* ar header starts on an even byte (2 byte aligned)
@@ -108,5 +108,5 @@ char get_header_ar(archive_handle_t *archive_handle)
108 /* Set the file pointer to the correct spot, we may have been reading a compressed file */ 108 /* Set the file pointer to the correct spot, we may have been reading a compressed file */
109 lseek(archive_handle->src_fd, archive_handle->offset, SEEK_SET); 109 lseek(archive_handle->src_fd, archive_handle->offset, SEEK_SET);
110 110
111 return(EXIT_SUCCESS); 111 return EXIT_SUCCESS;
112} 112}
diff --git a/coreutils/diff.c b/coreutils/diff.c
index f26bcca86..2920bf143 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -183,7 +183,7 @@ static int readhash(FILE * f)
183 for (i = 0; (t = getc(f)) != '\n'; i++) { 183 for (i = 0; (t = getc(f)) != '\n'; i++) {
184 if (t == EOF) { 184 if (t == EOF) {
185 if (i == 0) 185 if (i == 0)
186 return (0); 186 return 0;
187 break; 187 break;
188 } 188 }
189 sum = sum * 127 + t; 189 sum = sum * 127 + t;
@@ -191,7 +191,7 @@ static int readhash(FILE * f)
191 for (i = 0; (t = getc(f)) != '\n'; i++) { 191 for (i = 0; (t = getc(f)) != '\n'; i++) {
192 if (t == EOF) { 192 if (t == EOF) {
193 if (i == 0) 193 if (i == 0)
194 return (0); 194 return 0;
195 break; 195 break;
196 } 196 }
197 sum = sum * 127 + t; 197 sum = sum * 127 + t;
@@ -216,7 +216,7 @@ static int readhash(FILE * f)
216 continue; 216 continue;
217 case EOF: 217 case EOF:
218 if (i == 0) 218 if (i == 0)
219 return (0); 219 return 0;
220 /* FALLTHROUGH */ 220 /* FALLTHROUGH */
221 case '\n': 221 case '\n':
222 break; 222 break;
@@ -244,19 +244,19 @@ static int files_differ(FILE * f1, FILE * f2, int flags)
244 244
245 if ((flags & (D_EMPTY1 | D_EMPTY2)) || stb1.st_size != stb2.st_size || 245 if ((flags & (D_EMPTY1 | D_EMPTY2)) || stb1.st_size != stb2.st_size ||
246 (stb1.st_mode & S_IFMT) != (stb2.st_mode & S_IFMT)) 246 (stb1.st_mode & S_IFMT) != (stb2.st_mode & S_IFMT))
247 return (1); 247 return 1;
248 while (1) { 248 while (1) {
249 i = fread(buf1, 1, sizeof(buf1), f1); 249 i = fread(buf1, 1, sizeof(buf1), f1);
250 j = fread(buf2, 1, sizeof(buf2), f2); 250 j = fread(buf2, 1, sizeof(buf2), f2);
251 if (i != j) 251 if (i != j)
252 return (1); 252 return 1;
253 if (i == 0 && j == 0) { 253 if (i == 0 && j == 0) {
254 if (ferror(f1) || ferror(f2)) 254 if (ferror(f1) || ferror(f2))
255 return (1); 255 return 1;
256 return (0); 256 return 0;
257 } 257 }
258 if (memcmp(buf1, buf2, i) != 0) 258 if (memcmp(buf1, buf2, i) != 0)
259 return (1); 259 return 1;
260 } 260 }
261} 261}
262 262
@@ -333,7 +333,7 @@ static int isqrt(int n)
333 int y, x = 1; 333 int y, x = 1;
334 334
335 if (n == 0) 335 if (n == 0)
336 return (0); 336 return 0;
337 337
338 do { 338 do {
339 y = x; 339 y = x;
@@ -610,7 +610,7 @@ static int fetch(long *f, int a, int b, FILE * lb, int ch)
610 int i, j, c, lastc, col, nc; 610 int i, j, c, lastc, col, nc;
611 611
612 if (a > b) 612 if (a > b)
613 return (0); 613 return 0;
614 for (i = a; i <= b; i++) { 614 for (i = a; i <= b; i++) {
615 fseek(lb, f[i - 1], SEEK_SET); 615 fseek(lb, f[i - 1], SEEK_SET);
616 nc = f[i] - f[i - 1]; 616 nc = f[i] - f[i - 1];
@@ -623,7 +623,7 @@ static int fetch(long *f, int a, int b, FILE * lb, int ch)
623 for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) { 623 for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) {
624 if ((c = getc(lb)) == EOF) { 624 if ((c = getc(lb)) == EOF) {
625 puts("\n\\ No newline at end of file"); 625 puts("\n\\ No newline at end of file");
626 return (0); 626 return 0;
627 } 627 }
628 if (c == '\t' && (cmd_flags & FLAG_t)) { 628 if (c == '\t' && (cmd_flags & FLAG_t)) {
629 do { 629 do {
@@ -635,7 +635,7 @@ static int fetch(long *f, int a, int b, FILE * lb, int ch)
635 } 635 }
636 } 636 }
637 } 637 }
638 return (0); 638 return 0;
639} 639}
640 640
641static int asciifile(FILE * f) 641static int asciifile(FILE * f)
@@ -646,18 +646,18 @@ static int asciifile(FILE * f)
646#endif 646#endif
647 647
648 if ((cmd_flags & FLAG_a) || f == NULL) 648 if ((cmd_flags & FLAG_a) || f == NULL)
649 return (1); 649 return 1;
650 650
651#if ENABLE_FEATURE_DIFF_BINARY 651#if ENABLE_FEATURE_DIFF_BINARY
652 rewind(f); 652 rewind(f);
653 cnt = fread(buf, 1, sizeof(buf), f); 653 cnt = fread(buf, 1, sizeof(buf), f);
654 for (i = 0; i < cnt; i++) { 654 for (i = 0; i < cnt; i++) {
655 if (!isprint(buf[i]) && !isspace(buf[i])) { 655 if (!isprint(buf[i]) && !isspace(buf[i])) {
656 return (0); 656 return 0;
657 } 657 }
658 } 658 }
659#endif 659#endif
660 return (1); 660 return 1;
661} 661}
662 662
663/* dump accumulated "unified" diff changes */ 663/* dump accumulated "unified" diff changes */
diff --git a/coreutils/install.c b/coreutils/install.c
index 54adc2b6e..3e003905e 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -92,7 +92,7 @@ int install_main(int argc, char **argv)
92 } 92 }
93 } while (old_argv_ptr); 93 } while (old_argv_ptr);
94 } 94 }
95 return(ret); 95 return ret;
96 } 96 }
97 97
98 { 98 {
@@ -127,5 +127,5 @@ int install_main(int argc, char **argv)
127 if(ENABLE_FEATURE_CLEAN_UP && isdir) free(dest); 127 if(ENABLE_FEATURE_CLEAN_UP && isdir) free(dest);
128 } 128 }
129 129
130 return(ret); 130 return ret;
131} 131}
diff --git a/coreutils/sync.c b/coreutils/sync.c
index 8a7f18265..59f0b504a 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -19,5 +19,5 @@ int sync_main(int argc, char **argv)
19 19
20 sync(); 20 sync();
21 21
22 return(EXIT_SUCCESS); 22 return EXIT_SUCCESS;
23} 23}
diff --git a/coreutils/test.c b/coreutils/test.c
index c1097c28c..ebb4f9086 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -520,17 +520,17 @@ static int test_eaccess(char *path, int mode)
520 unsigned int euid = geteuid(); 520 unsigned int euid = geteuid();
521 521
522 if (stat(path, &st) < 0) 522 if (stat(path, &st) < 0)
523 return (-1); 523 return -1;
524 524
525 if (euid == 0) { 525 if (euid == 0) {
526 /* Root can read or write any file. */ 526 /* Root can read or write any file. */
527 if (mode != X_OK) 527 if (mode != X_OK)
528 return (0); 528 return 0;
529 529
530 /* Root can execute any file that has any one of the execute 530 /* Root can execute any file that has any one of the execute
531 bits set. */ 531 bits set. */
532 if (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) 532 if (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))
533 return (0); 533 return 0;
534 } 534 }
535 535
536 if (st.st_uid == euid) /* owner */ 536 if (st.st_uid == euid) /* owner */
@@ -539,9 +539,9 @@ static int test_eaccess(char *path, int mode)
539 mode <<= 3; 539 mode <<= 3;
540 540
541 if (st.st_mode & mode) 541 if (st.st_mode & mode)
542 return (0); 542 return 0;
543 543
544 return (-1); 544 return -1;
545} 545}
546 546
547static void initialize_group_array(void) 547static void initialize_group_array(void)
@@ -560,7 +560,7 @@ static int is_a_group_member(gid_t gid)
560 560
561 /* Short-circuit if possible, maybe saving a call to getgroups(). */ 561 /* Short-circuit if possible, maybe saving a call to getgroups(). */
562 if (gid == getgid() || gid == getegid()) 562 if (gid == getgid() || gid == getegid())
563 return (1); 563 return 1;
564 564
565 if (ngroups == 0) 565 if (ngroups == 0)
566 initialize_group_array(); 566 initialize_group_array();
@@ -568,9 +568,9 @@ static int is_a_group_member(gid_t gid)
568 /* Search through the list looking for GID. */ 568 /* Search through the list looking for GID. */
569 for (i = 0; i < ngroups; i++) 569 for (i = 0; i < ngroups; i++)
570 if (gid == group_array[i]) 570 if (gid == group_array[i])
571 return (1); 571 return 1;
572 572
573 return (0); 573 return 0;
574} 574}
575 575
576 576
diff --git a/coreutils/tr.c b/coreutils/tr.c
index f2c9065d1..237ade047 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -249,5 +249,5 @@ int tr_main(int argc, char **argv)
249 outvec[(GCC4_IS_STUPID)output[i]] = TRUE; 249 outvec[(GCC4_IS_STUPID)output[i]] = TRUE;
250 } 250 }
251 convert(); 251 convert();
252 return (0); 252 return 0;
253} 253}
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index 448fe80c1..2b3b18854 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -85,7 +85,7 @@ static int run_parts(char **args, const unsigned char test_mode)
85 85
86 if (entries == -1) { 86 if (entries == -1) {
87 if (test_mode & 2) { 87 if (test_mode & 2) {
88 return(2); 88 return 2;
89 } 89 }
90 bb_perror_msg_and_die("cannot open '%s'", arg0); 90 bb_perror_msg_and_die("cannot open '%s'", arg0);
91 } 91 }
diff --git a/e2fsprogs/blkid/dev.c b/e2fsprogs/blkid/dev.c
index b34d4a965..f9f8c63bb 100644
--- a/e2fsprogs/blkid/dev.c
+++ b/e2fsprogs/blkid/dev.c
@@ -209,6 +209,6 @@ int main(int argc, char **argv)
209 209
210 210
211 blkid_put_cache(cache); 211 blkid_put_cache(cache);
212 return (0); 212 return 0;
213} 213}
214#endif 214#endif
diff --git a/e2fsprogs/blkid/devname.c b/e2fsprogs/blkid/devname.c
index 532aeeaab..d69000be7 100644
--- a/e2fsprogs/blkid/devname.c
+++ b/e2fsprogs/blkid/devname.c
@@ -363,6 +363,6 @@ int main(int argc, char **argv)
363 printf("%s: error probing devices\n", argv[0]); 363 printf("%s: error probing devices\n", argv[0]);
364 364
365 blkid_put_cache(cache); 365 blkid_put_cache(cache);
366 return (0); 366 return 0;
367} 367}
368#endif 368#endif
diff --git a/e2fsprogs/blkid/probe.c b/e2fsprogs/blkid/probe.c
index a2165efee..ea9a619ee 100644
--- a/e2fsprogs/blkid/probe.c
+++ b/e2fsprogs/blkid/probe.c
@@ -706,7 +706,7 @@ int main(int argc, char **argv)
706 dev = blkid_get_dev(cache, argv[1], BLKID_DEV_NORMAL); 706 dev = blkid_get_dev(cache, argv[1], BLKID_DEV_NORMAL);
707 if (!dev) { 707 if (!dev) {
708 printf("%s: %s has an unsupported type\n", argv[0], argv[1]); 708 printf("%s: %s has an unsupported type\n", argv[0], argv[1]);
709 return (1); 709 return 1;
710 } 710 }
711 printf("%s is type %s\n", argv[1], dev->bid_type ? 711 printf("%s is type %s\n", argv[1], dev->bid_type ?
712 dev->bid_type : "(null)"); 712 dev->bid_type : "(null)");
@@ -716,6 +716,6 @@ int main(int argc, char **argv)
716 printf("\tuuid is %s\n", dev->bid_uuid); 716 printf("\tuuid is %s\n", dev->bid_uuid);
717 717
718 blkid_free_dev(dev); 718 blkid_free_dev(dev);
719 return (0); 719 return 0;
720} 720}
721#endif 721#endif
diff --git a/e2fsprogs/blkid/tag.c b/e2fsprogs/blkid/tag.c
index 3bbd4c1f4..7cf30b45f 100644
--- a/e2fsprogs/blkid/tag.c
+++ b/e2fsprogs/blkid/tag.c
@@ -416,7 +416,7 @@ int main(int argc, char **argv)
416 printf("Device %s: (%s, %s) %s\n", blkid_dev_devname(dev), 416 printf("Device %s: (%s, %s) %s\n", blkid_dev_devname(dev),
417 search_type, search_value ? search_value : "NULL", 417 search_type, search_value ? search_value : "NULL",
418 found ? "FOUND" : "NOT FOUND"); 418 found ? "FOUND" : "NOT FOUND");
419 return(!found); 419 return !found;
420 } 420 }
421 printf("Device %s...\n", blkid_dev_devname(dev)); 421 printf("Device %s...\n", blkid_dev_devname(dev));
422 422
@@ -427,6 +427,6 @@ int main(int argc, char **argv)
427 blkid_tag_iterate_end(iter); 427 blkid_tag_iterate_end(iter);
428 428
429 blkid_put_cache(cache); 429 blkid_put_cache(cache);
430 return (0); 430 return 0;
431} 431}
432#endif 432#endif
diff --git a/e2fsprogs/e2fsck.c b/e2fsprogs/e2fsck.c
index ea5b08ccc..c48244121 100644
--- a/e2fsprogs/e2fsck.c
+++ b/e2fsprogs/e2fsck.c
@@ -739,7 +739,7 @@ static struct dir_info *e2fsck_dir_info_iter(e2fsck_t ctx, int *control)
739 if (*control >= ctx->dir_info_count) 739 if (*control >= ctx->dir_info_count)
740 return 0; 740 return 0;
741 741
742 return(ctx->dir_info + (*control)++); 742 return ctx->dir_info + (*control)++;
743} 743}
744 744
745/* 745/*
@@ -870,7 +870,7 @@ static struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, int *control)
870 if (*control >= ctx->dx_dir_info_count) 870 if (*control >= ctx->dx_dir_info_count)
871 return 0; 871 return 0;
872 872
873 return(ctx->dx_dir_info + (*control)++); 873 return ctx->dx_dir_info + (*control)++;
874} 874}
875 875
876#endif /* ENABLE_HTREE */ 876#endif /* ENABLE_HTREE */
@@ -1055,7 +1055,7 @@ static errcode_t ea_refcount_create(int size, ext2_refcount_t *ret)
1055 1055
1056errout: 1056errout:
1057 ea_refcount_free(refcount); 1057 ea_refcount_free(refcount);
1058 return(retval); 1058 return retval;
1059} 1059}
1060 1060
1061/* 1061/*
@@ -4929,7 +4929,7 @@ static int search_dirent_proc(ext2_ino_t dir, int entry,
4929 p->dir = dir; 4929 p->dir = dir;
4930 sd->count--; 4930 sd->count--;
4931 4931
4932 return(sd->count ? 0 : DIRENT_ABORT); 4932 return sd->count ? 0 : DIRENT_ABORT;
4933} 4933}
4934 4934
4935 4935
diff --git a/e2fsprogs/ext2fs/icount.c b/e2fsprogs/ext2fs/icount.c
index 521e00bb7..7ab5f51f4 100644
--- a/e2fsprogs/ext2fs/icount.c
+++ b/e2fsprogs/ext2fs/icount.c
@@ -139,7 +139,7 @@ errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags, unsigned int size,
139 139
140errout: 140errout:
141 ext2fs_free_icount(icount); 141 ext2fs_free_icount(icount);
142 return(retval); 142 return retval;
143} 143}
144 144
145errcode_t ext2fs_create_icount(ext2_filsys fs, int flags, 145errcode_t ext2fs_create_icount(ext2_filsys fs, int flags,
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index 66b78b624..f0c1316a9 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -549,7 +549,7 @@ static char *find_fsck(char *type)
549 free(s); 549 free(s);
550 } 550 }
551 free(p); 551 free(p);
552 return(s); 552 return s;
553} 553}
554 554
555static int progress_active(void) 555static int progress_active(void)
diff --git a/e2fsprogs/uuid/compare.c b/e2fsprogs/uuid/compare.c
index 2be9e90a3..348ea7c1f 100644
--- a/e2fsprogs/uuid/compare.c
+++ b/e2fsprogs/uuid/compare.c
@@ -38,7 +38,7 @@
38#include "uuidP.h" 38#include "uuidP.h"
39#include <string.h> 39#include <string.h>
40 40
41#define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1); 41#define UUCMP(u1,u2) if (u1 != u2) return (u1 < u2) ? -1 : 1;
42 42
43int uuid_compare(const uuid_t uu1, const uuid_t uu2) 43int uuid_compare(const uuid_t uu1, const uuid_t uu2)
44{ 44{
diff --git a/editors/patch.c b/editors/patch.c
index 4ddcd004d..f11f8a1a2 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -43,7 +43,7 @@ static unsigned int copy_lines(FILE *src_stream, FILE *dest_stream, const unsign
43 43
44 i++; 44 i++;
45 } 45 }
46 return(i); 46 return i;
47} 47}
48 48
49/* If patch_level is -1 it will remove all directory names 49/* If patch_level is -1 it will remove all directory names
@@ -67,13 +67,13 @@ static char *extract_filename(char *line, int patch_level)
67 filename_start_ptr = temp + 1; 67 filename_start_ptr = temp + 1;
68 } 68 }
69 69
70 return(xstrdup(filename_start_ptr)); 70 return xstrdup(filename_start_ptr);
71} 71}
72 72
73static int file_doesnt_exist(const char *filename) 73static int file_doesnt_exist(const char *filename)
74{ 74{
75 struct stat statbuf; 75 struct stat statbuf;
76 return(stat(filename, &statbuf)); 76 return stat(filename, &statbuf);
77} 77}
78 78
79int patch_main(int argc, char **argv) 79int patch_main(int argc, char **argv)
@@ -269,5 +269,5 @@ int patch_main(int argc, char **argv)
269 * 1 = Some hunks failed 269 * 1 = Some hunks failed
270 * 2 = More serious problems 270 * 2 = More serious problems
271 */ 271 */
272 return(ret); 272 return ret;
273} 273}
diff --git a/editors/vi.c b/editors/vi.c
index f1c79895e..3f9ba4698 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -343,7 +343,7 @@ int vi_main(int argc, char **argv)
343 } 343 }
344 //----------------------------------------------------------- 344 //-----------------------------------------------------------
345 345
346 return (0); 346 return 0;
347} 347}
348 348
349static void edit_file(Byte * fn) 349static void edit_file(Byte * fn)
@@ -530,7 +530,7 @@ static Byte *get_one_address(Byte * p, int *addr) // get colon addr, if present
530 // unrecognised address- assume -1 530 // unrecognised address- assume -1
531 *addr = -1; 531 *addr = -1;
532 } 532 }
533 return (p); 533 return p;
534} 534}
535 535
536static Byte *get_address(Byte *p, int *b, int *e) // get two colon addrs, if present 536static Byte *get_address(Byte *p, int *b, int *e) // get two colon addrs, if present
@@ -558,7 +558,7 @@ static Byte *get_address(Byte *p, int *b, int *e) // get two colon addrs, if pre
558ga0: 558ga0:
559 while (isblnk(*p)) 559 while (isblnk(*p))
560 p++; // skip over trailing spaces 560 p++; // skip over trailing spaces
561 return (p); 561 return p;
562} 562}
563 563
564#ifdef CONFIG_FEATURE_VI_SETOPTS 564#ifdef CONFIG_FEATURE_VI_SETOPTS
@@ -1166,14 +1166,14 @@ static Byte *begin_line(Byte * p) // return pointer to first char cur line
1166{ 1166{
1167 while (p > text && p[-1] != '\n') 1167 while (p > text && p[-1] != '\n')
1168 p--; // go to cur line B-o-l 1168 p--; // go to cur line B-o-l
1169 return (p); 1169 return p;
1170} 1170}
1171 1171
1172static Byte *end_line(Byte * p) // return pointer to NL of cur line line 1172static Byte *end_line(Byte * p) // return pointer to NL of cur line line
1173{ 1173{
1174 while (p < end - 1 && *p != '\n') 1174 while (p < end - 1 && *p != '\n')
1175 p++; // go to cur line E-o-l 1175 p++; // go to cur line E-o-l
1176 return (p); 1176 return p;
1177} 1177}
1178 1178
1179static inline Byte *dollar_line(Byte * p) // return pointer to just before NL line 1179static inline Byte *dollar_line(Byte * p) // return pointer to just before NL line
@@ -1183,7 +1183,7 @@ static inline Byte *dollar_line(Byte * p) // return pointer to just before NL li
1183 // Try to stay off of the Newline 1183 // Try to stay off of the Newline
1184 if (*p == '\n' && (p - begin_line(p)) > 0) 1184 if (*p == '\n' && (p - begin_line(p)) > 0)
1185 p--; 1185 p--;
1186 return (p); 1186 return p;
1187} 1187}
1188 1188
1189static Byte *prev_line(Byte * p) // return pointer first char prev line 1189static Byte *prev_line(Byte * p) // return pointer first char prev line
@@ -1192,7 +1192,7 @@ static Byte *prev_line(Byte * p) // return pointer first char prev line
1192 if (p[-1] == '\n' && p > text) 1192 if (p[-1] == '\n' && p > text)
1193 p--; // step to prev line 1193 p--; // step to prev line
1194 p = begin_line(p); // goto begining of prev line 1194 p = begin_line(p); // goto begining of prev line
1195 return (p); 1195 return p;
1196} 1196}
1197 1197
1198static Byte *next_line(Byte * p) // return pointer first char next line 1198static Byte *next_line(Byte * p) // return pointer first char next line
@@ -1200,7 +1200,7 @@ static Byte *next_line(Byte * p) // return pointer first char next line
1200 p = end_line(p); 1200 p = end_line(p);
1201 if (*p == '\n' && p < end - 1) 1201 if (*p == '\n' && p < end - 1)
1202 p++; // step to next line 1202 p++; // step to next line
1203 return (p); 1203 return p;
1204} 1204}
1205 1205
1206//----- Text Information Routines ------------------------------ 1206//----- Text Information Routines ------------------------------
@@ -1214,7 +1214,7 @@ static Byte *end_screen(void)
1214 for (cnt = 0; cnt < rows - 2; cnt++) 1214 for (cnt = 0; cnt < rows - 2; cnt++)
1215 q = next_line(q); 1215 q = next_line(q);
1216 q = end_line(q); 1216 q = end_line(q);
1217 return (q); 1217 return q;
1218} 1218}
1219 1219
1220static int count_lines(Byte * start, Byte * stop) // count line from start to stop 1220static int count_lines(Byte * start, Byte * stop) // count line from start to stop
@@ -1243,7 +1243,7 @@ static Byte *find_line(int li) // find begining of line #li
1243 for (q = text; li > 1; li--) { 1243 for (q = text; li > 1; li--) {
1244 q = next_line(q); 1244 q = next_line(q);
1245 } 1245 }
1246 return (q); 1246 return q;
1247} 1247}
1248 1248
1249//----- Dot Movement Routines ---------------------------------- 1249//----- Dot Movement Routines ----------------------------------
@@ -1285,7 +1285,7 @@ static Byte *move_to_col(Byte * p, int l)
1285 co++; // display as ^X, use 2 columns 1285 co++; // display as ^X, use 2 columns
1286 } 1286 }
1287 } while (++co <= l && p++ < end); 1287 } while (++co <= l && p++ < end);
1288 return (p); 1288 return p;
1289} 1289}
1290 1290
1291static void dot_next(void) 1291static void dot_next(void)
@@ -1344,7 +1344,7 @@ static Byte *bound_dot(Byte * p) // make sure text[0] <= P < "end"
1344 p = text; 1344 p = text;
1345 indicate_error('2'); 1345 indicate_error('2');
1346 } 1346 }
1347 return (p); 1347 return p;
1348} 1348}
1349 1349
1350//----- Helper Utility Routines -------------------------------- 1350//----- Helper Utility Routines --------------------------------
@@ -1489,7 +1489,7 @@ static Byte *char_search(Byte * p, Byte * pat, int dir, int range) // search for
1489 } else { 1489 } else {
1490 p = p - i; 1490 p = p - i;
1491 } 1491 }
1492 return (p); 1492 return p;
1493#endif /*REGEX_SEARCH */ 1493#endif /*REGEX_SEARCH */
1494} 1494}
1495#endif /* CONFIG_FEATURE_VI_SEARCH */ 1495#endif /* CONFIG_FEATURE_VI_SEARCH */
@@ -1540,7 +1540,7 @@ static Byte *char_insert(Byte * p, Byte c) // insert the char c at 'p'
1540 } 1540 }
1541#endif /* CONFIG_FEATURE_VI_SETOPTS */ 1541#endif /* CONFIG_FEATURE_VI_SETOPTS */
1542 } 1542 }
1543 return (p); 1543 return p;
1544} 1544}
1545 1545
1546static Byte *stupid_insert(Byte * p, Byte c) // stupidly insert the char c at 'p' 1546static Byte *stupid_insert(Byte * p, Byte c) // stupidly insert the char c at 'p'
@@ -1551,7 +1551,7 @@ static Byte *stupid_insert(Byte * p, Byte c) // stupidly insert the char c at 'p
1551 file_modified++; // has the file been modified 1551 file_modified++; // has the file been modified
1552 p++; 1552 p++;
1553 } 1553 }
1554 return (p); 1554 return p;
1555} 1555}
1556 1556
1557static Byte find_range(Byte ** start, Byte ** stop, Byte c) 1557static Byte find_range(Byte ** start, Byte ** stop, Byte c)
@@ -1659,7 +1659,7 @@ static Byte *skip_thing(Byte * p, int linecnt, int dir, int type)
1659 break; 1659 break;
1660 p += dir; // move to next char 1660 p += dir; // move to next char
1661 } 1661 }
1662 return (p); 1662 return p;
1663} 1663}
1664 1664
1665// find matching char of pair () [] {} 1665// find matching char of pair () [] {}
@@ -1705,7 +1705,7 @@ static Byte *find_pair(Byte * p, Byte c)
1705 } 1705 }
1706 if (level != 0) 1706 if (level != 0)
1707 q = NULL; // indicate no match 1707 q = NULL; // indicate no match
1708 return (q); 1708 return q;
1709} 1709}
1710 1710
1711#ifdef CONFIG_FEATURE_VI_SETOPTS 1711#ifdef CONFIG_FEATURE_VI_SETOPTS
@@ -1748,7 +1748,7 @@ static Byte *text_hole_make(Byte * p, int size) // at "p", make a 'size' byte ho
1748 end = end + size; // adjust the new END 1748 end = end + size; // adjust the new END
1749 file_modified++; // has the file been modified 1749 file_modified++; // has the file been modified
1750 thm0: 1750 thm0:
1751 return (p); 1751 return p;
1752} 1752}
1753 1753
1754// close a hole in text[] 1754// close a hole in text[]
@@ -1805,7 +1805,7 @@ static Byte *yank_delete(Byte * start, Byte * stop, int dist, int yf)
1805 // we cannot cross NL boundaries 1805 // we cannot cross NL boundaries
1806 p = start; 1806 p = start;
1807 if (*p == '\n') 1807 if (*p == '\n')
1808 return (p); 1808 return p;
1809 // dont go past a NewLine 1809 // dont go past a NewLine
1810 for (; p + 1 <= stop; p++) { 1810 for (; p + 1 <= stop; p++) {
1811 if (p[1] == '\n') { 1811 if (p[1] == '\n') {
@@ -1821,7 +1821,7 @@ static Byte *yank_delete(Byte * start, Byte * stop, int dist, int yf)
1821 if (yf == YANKDEL) { 1821 if (yf == YANKDEL) {
1822 p = text_hole_delete(start, stop); 1822 p = text_hole_delete(start, stop);
1823 } // delete lines 1823 } // delete lines
1824 return (p); 1824 return p;
1825} 1825}
1826 1826
1827static void show_help(void) 1827static void show_help(void)
@@ -1932,7 +1932,7 @@ static Byte *string_insert(Byte * p, Byte * s) // insert the string at 'p'
1932#ifdef CONFIG_FEATURE_VI_YANKMARK 1932#ifdef CONFIG_FEATURE_VI_YANKMARK
1933 psb("Put %d lines (%d chars) from [%c]", cnt, i, what_reg()); 1933 psb("Put %d lines (%d chars) from [%c]", cnt, i, what_reg());
1934#endif /* CONFIG_FEATURE_VI_YANKMARK */ 1934#endif /* CONFIG_FEATURE_VI_YANKMARK */
1935 return (p); 1935 return p;
1936} 1936}
1937#endif /* CONFIG_FEATURE_VI_YANKMARK || CONFIG_FEATURE_VI_COLON || CONFIG_FEATURE_VI_CRASHME */ 1937#endif /* CONFIG_FEATURE_VI_YANKMARK || CONFIG_FEATURE_VI_COLON || CONFIG_FEATURE_VI_CRASHME */
1938 1938
@@ -1954,7 +1954,7 @@ static Byte *text_yank(Byte * p, Byte * q, int dest) // copy text into a registe
1954 memset(t, '\0', cnt + 1); // clear new text[] 1954 memset(t, '\0', cnt + 1); // clear new text[]
1955 strncpy((char *) t, (char *) p, cnt); // copy text[] into bufer 1955 strncpy((char *) t, (char *) p, cnt); // copy text[] into bufer
1956 reg[dest] = t; 1956 reg[dest] = t;
1957 return (p); 1957 return p;
1958} 1958}
1959 1959
1960static Byte what_reg(void) 1960static Byte what_reg(void)
@@ -2004,7 +2004,7 @@ static inline Byte *swap_context(Byte * p) // goto new context for '' command ma
2004 context_start = prev_line(prev_line(prev_line(p))); 2004 context_start = prev_line(prev_line(prev_line(p)));
2005 context_end = next_line(next_line(next_line(p))); 2005 context_end = next_line(next_line(next_line(p)));
2006 } 2006 }
2007 return (p); 2007 return p;
2008} 2008}
2009#endif /* CONFIG_FEATURE_VI_YANKMARK */ 2009#endif /* CONFIG_FEATURE_VI_YANKMARK */
2010 2010
@@ -2306,7 +2306,7 @@ static int file_size(const Byte * fn) // what is the byte size of "fn"
2306 int cnt, sr; 2306 int cnt, sr;
2307 2307
2308 if (fn == 0 || strlen((char *)fn) <= 0) 2308 if (fn == 0 || strlen((char *)fn) <= 0)
2309 return (-1); 2309 return -1;
2310 cnt = -1; 2310 cnt = -1;
2311 sr = stat((char *) fn, &st_buf); // see if file exists 2311 sr = stat((char *) fn, &st_buf); // see if file exists
2312 if (sr >= 0) { 2312 if (sr >= 0) {
@@ -2391,7 +2391,7 @@ static int file_write(Byte * fn, Byte * first, Byte * last)
2391 // FIXIT- use the correct umask() 2391 // FIXIT- use the correct umask()
2392 fd = open((char *) fn, (O_WRONLY | O_CREAT | O_TRUNC), 0664); 2392 fd = open((char *) fn, (O_WRONLY | O_CREAT | O_TRUNC), 0664);
2393 if (fd < 0) 2393 if (fd < 0)
2394 return (-1); 2394 return -1;
2395 cnt = last - first + 1; 2395 cnt = last - first + 1;
2396 charcnt = write(fd, first, cnt); 2396 charcnt = write(fd, first, cnt);
2397 if (charcnt == cnt) { 2397 if (charcnt == cnt) {
diff --git a/libbb/dump.c b/libbb/dump.c
index 8be29efad..4e4c2e12c 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -322,7 +322,7 @@ static int next(char **argv)
322 322
323 if (argv) { 323 if (argv) {
324 _argv = argv; 324 _argv = argv;
325 return (1); 325 return 1;
326 } 326 }
327 for (;;) { 327 for (;;) {
328 if (*_argv) { 328 if (*_argv) {
@@ -335,7 +335,7 @@ static int next(char **argv)
335 statok = done = 1; 335 statok = done = 1;
336 } else { 336 } else {
337 if (done++) 337 if (done++)
338 return (0); 338 return 0;
339 statok = 0; 339 statok = 0;
340 } 340 }
341 if (bb_dump_skip) 341 if (bb_dump_skip)
@@ -343,7 +343,7 @@ static int next(char **argv)
343 if (*_argv) 343 if (*_argv)
344 ++_argv; 344 ++_argv;
345 if (!bb_dump_skip) 345 if (!bb_dump_skip)
346 return (1); 346 return 1;
347 } 347 }
348 /* NOTREACHED */ 348 /* NOTREACHED */
349} 349}
diff --git a/libbb/obscure.c b/libbb/obscure.c
index 9ac6bcd82..56aacc910 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -97,7 +97,7 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
97 97
98 /* size */ 98 /* size */
99 if (!new_p || (length = strlen(new_p)) < CONFIG_PASSWORD_MINLEN) 99 if (!new_p || (length = strlen(new_p)) < CONFIG_PASSWORD_MINLEN)
100 return("too short"); 100 return "too short";
101 101
102 /* no username as-is, as sub-string, reversed, capitalized, doubled */ 102 /* no username as-is, as sub-string, reversed, capitalized, doubled */
103 if (string_checker(new_p, pw->pw_name)) { 103 if (string_checker(new_p, pw->pw_name)) {
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index de046e818..968270fff 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -1254,7 +1254,7 @@ static int get_uid_gid (int flag, const char *string)
1254 1254
1255 if(ENABLE_DEVFSD_VERBOSE) 1255 if(ENABLE_DEVFSD_VERBOSE)
1256 msg_logger(LOG_ERR,"unknown %s: %s, defaulting to %cid=0", msg, string, msg[0]); 1256 msg_logger(LOG_ERR,"unknown %s: %s, defaulting to %cid=0", msg, string, msg[0]);
1257 return (0); 1257 return 0;
1258}/* End Function get_uid_gid */ 1258}/* End Function get_uid_gid */
1259 1259
1260static mode_t get_mode (const char *string) 1260static mode_t get_mode (const char *string)
@@ -1321,7 +1321,7 @@ static const char *get_variable (const char *variable, void *info)
1321 if( i >= 0 && i <= 3) 1321 if( i >= 0 && i <= 3)
1322 { 1322 {
1323 debug_msg_logger(LOG_INFO, "%s: i=%d %s", __FUNCTION__, i ,field_names[i+7]); 1323 debug_msg_logger(LOG_INFO, "%s: i=%d %s", __FUNCTION__, i ,field_names[i+7]);
1324 return(field_names[i+7]); 1324 return field_names[i+7];
1325 } 1325 }
1326 1326
1327 if(i == 4 ) 1327 if(i == 4 )
@@ -1417,17 +1417,15 @@ static int mksymlink (const char *oldpath, const char *newpath)
1417 debug_msg_logger(LOG_INFO, __FUNCTION__); 1417 debug_msg_logger(LOG_INFO, __FUNCTION__);
1418 1418
1419 if ( !make_dir_tree (newpath) ) 1419 if ( !make_dir_tree (newpath) )
1420 return (-1); 1420 return -1;
1421 1421
1422 if (symlink (oldpath, newpath) != 0) 1422 if (symlink (oldpath, newpath) != 0) {
1423 { 1423 if (errno != EEXIST) {
1424 if (errno != EEXIST)
1425 {
1426 debug_msg_logger(LOG_ERR, "%s: %s to %s: %m", __FUNCTION__, oldpath, newpath); 1424 debug_msg_logger(LOG_ERR, "%s: %s to %s: %m", __FUNCTION__, oldpath, newpath);
1427 return (-1); 1425 return -1;
1428 } 1426 }
1429 } 1427 }
1430 return (0); 1428 return 0;
1431} /* End Function mksymlink */ 1429} /* End Function mksymlink */
1432 1430
1433 1431
@@ -1444,7 +1442,7 @@ static int make_dir_tree (const char *path)
1444 debug_msg_logger(LOG_ERR, "%s: %s: %m",__FUNCTION__, path); 1442 debug_msg_logger(LOG_ERR, "%s: %s: %m",__FUNCTION__, path);
1445 return (FALSE); 1443 return (FALSE);
1446 } 1444 }
1447 return(TRUE); 1445 return TRUE;
1448} /* End Function make_dir_tree */ 1446} /* End Function make_dir_tree */
1449 1447
1450static int expand_expression(char *output, unsigned int outsize, 1448static int expand_expression(char *output, unsigned int outsize,
diff --git a/modutils/insmod.c b/modutils/insmod.c
index f6ab44309..dd999a672 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -3632,9 +3632,9 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
3632 *license = value+1; 3632 *license = value+1;
3633 for (i = 0; i < sizeof(gpl_licenses)/sizeof(gpl_licenses[0]); ++i) { 3633 for (i = 0; i < sizeof(gpl_licenses)/sizeof(gpl_licenses[0]); ++i) {
3634 if (strcmp(value+1, gpl_licenses[i]) == 0) 3634 if (strcmp(value+1, gpl_licenses[i]) == 0)
3635 return(0); 3635 return 0;
3636 } 3636 }
3637 return(2); 3637 return 2;
3638 } 3638 }
3639 if (strchr(ptr, '\0')) 3639 if (strchr(ptr, '\0'))
3640 ptr = strchr(ptr, '\0') + 1; 3640 ptr = strchr(ptr, '\0') + 1;
@@ -3642,7 +3642,7 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
3642 ptr = endptr; 3642 ptr = endptr;
3643 } 3643 }
3644 } 3644 }
3645 return(1); 3645 return 1;
3646} 3646}
3647 3647
3648#define TAINT_FILENAME "/proc/sys/kernel/tainted" 3648#define TAINT_FILENAME "/proc/sys/kernel/tainted"
@@ -4227,12 +4227,11 @@ out:
4227 if(fp) 4227 if(fp)
4228 fclose(fp); 4228 fclose(fp);
4229 free(tmp1); 4229 free(tmp1);
4230 if(!tmp1) { 4230 if(!tmp1)
4231 free(m_name); 4231 free(m_name);
4232 }
4233 free(m_filename); 4232 free(m_filename);
4234#endif 4233#endif
4235 return(exit_status); 4234 return exit_status;
4236} 4235}
4237 4236
4238 4237
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index f462aafc3..ffde3d829 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -134,7 +134,7 @@ int lsmod_main(int argc, char **argv)
134 free(module_names); 134 free(module_names);
135#endif 135#endif
136 136
137 return( 0); 137 return 0;
138} 138}
139 139
140#else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */ 140#else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index ce239a21f..22e864d57 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -57,8 +57,8 @@ int rmmod_main(int argc, char **argv)
57 57
58 while (nmod != pnmod) { 58 while (nmod != pnmod) {
59 if (syscall(__NR_delete_module, NULL, flags) != 0) { 59 if (syscall(__NR_delete_module, NULL, flags) != 0) {
60 if (errno==EFAULT) 60 if (errno == EFAULT)
61 return(ret); 61 return ret;
62 bb_perror_msg_and_die("rmmod"); 62 bb_perror_msg_and_die("rmmod");
63 } 63 }
64 pnmod = nmod; 64 pnmod = nmod;
@@ -92,5 +92,5 @@ int rmmod_main(int argc, char **argv)
92 } 92 }
93 } 93 }
94 94
95 return(ret); 95 return ret;
96} 96}
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 3773f9937..1facfa3d8 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -100,7 +100,7 @@ static FILE *ftp_login(ftp_host_info_t *server)
100 100
101 ftpcmd("TYPE I", NULL, control_stream, buf); 101 ftpcmd("TYPE I", NULL, control_stream, buf);
102 102
103 return(control_stream); 103 return control_stream;
104} 104}
105 105
106#if !ENABLE_FTPGET 106#if !ENABLE_FTPGET
@@ -187,7 +187,7 @@ int ftp_receive(ftp_host_info_t *server, FILE *control_stream,
187 } 187 }
188 ftpcmd("QUIT", NULL, control_stream, buf); 188 ftpcmd("QUIT", NULL, control_stream, buf);
189 189
190 return(EXIT_SUCCESS); 190 return EXIT_SUCCESS;
191} 191}
192#endif 192#endif
193 193
@@ -252,7 +252,7 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream,
252 } 252 }
253 ftpcmd("QUIT", NULL, control_stream, buf); 253 ftpcmd("QUIT", NULL, control_stream, buf);
254 254
255 return(EXIT_SUCCESS); 255 return EXIT_SUCCESS;
256} 256}
257#endif 257#endif
258 258
@@ -338,5 +338,5 @@ int ftpgetput_main(int argc, char **argv)
338 /* Connect/Setup/Configure the FTP session */ 338 /* Connect/Setup/Configure the FTP session */
339 control_stream = ftp_login(server); 339 control_stream = ftp_login(server);
340 340
341 return(ftp_action(server, control_stream, argv[optind + 1], argv[optind + 2])); 341 return ftp_action(server, control_stream, argv[optind + 1], argv[optind + 2]);
342} 342}
diff --git a/shell/ash.c b/shell/ash.c
index 4fef0f2d3..704d03bec 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2129,10 +2129,10 @@ unalias(const char *name)
2129 INTOFF; 2129 INTOFF;
2130 *app = freealias(*app); 2130 *app = freealias(*app);
2131 INTON; 2131 INTON;
2132 return (0); 2132 return 0;
2133 } 2133 }
2134 2134
2135 return (1); 2135 return 1;
2136} 2136}
2137 2137
2138static void 2138static void
@@ -2181,7 +2181,7 @@ aliascmd(int argc, char **argv)
2181 for (ap = atab[i]; ap; ap = ap->next) { 2181 for (ap = atab[i]; ap; ap = ap->next) {
2182 printalias(ap); 2182 printalias(ap);
2183 } 2183 }
2184 return (0); 2184 return 0;
2185 } 2185 }
2186 while ((n = *++argv) != NULL) { 2186 while ((n = *++argv) != NULL) {
2187 if ((v = strchr(n+1, '=')) == NULL) { /* n+1: funny ksh stuff */ 2187 if ((v = strchr(n+1, '=')) == NULL) { /* n+1: funny ksh stuff */
@@ -2207,7 +2207,7 @@ unaliascmd(int argc, char **argv)
2207 while ((i = nextopt("a")) != '\0') { 2207 while ((i = nextopt("a")) != '\0') {
2208 if (i == 'a') { 2208 if (i == 'a') {
2209 rmaliases(); 2209 rmaliases();
2210 return (0); 2210 return 0;
2211 } 2211 }
2212 } 2212 }
2213 for (i = 0; *argptr; argptr++) { 2213 for (i = 0; *argptr; argptr++) {
@@ -13420,7 +13420,8 @@ static int arith_apply(operator op, v_n_t *numstack, v_n_t **numstackptr)
13420 /* protect geting var value, is number now */ 13420 /* protect geting var value, is number now */
13421 numptr_m1->var = NULL; 13421 numptr_m1->var = NULL;
13422 return 0; 13422 return 0;
13423err: return(-1); 13423 err:
13424 return -1;
13424} 13425}
13425 13426
13426/* longest must first */ 13427/* longest must first */
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index dda6f6958..ceaa2e885 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -1180,7 +1180,8 @@ static int get_next_history(void)
1180 1180
1181 if (ch < n_history) { 1181 if (ch < n_history) {
1182 get_previous_history(); /* save the current history line */ 1182 get_previous_history(); /* save the current history line */
1183 return (cur_history = ch+1); 1183 cur_history = ch + 1;
1184 return cur_history;
1184 } else { 1185 } else {
1185 beep(); 1186 beep();
1186 return 0; 1187 return 0;
diff --git a/shell/hush.c b/shell/hush.c
index 2013a9d2b..57b4a7ac3 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1225,7 +1225,7 @@ static int checkjobs(struct pipe* fg_pipe)
1225 if (i==fg_pipe->num_progs-1) 1225 if (i==fg_pipe->num_progs-1)
1226 rcode=WEXITSTATUS(status); 1226 rcode=WEXITSTATUS(status);
1227 (fg_pipe->num_progs)--; 1227 (fg_pipe->num_progs)--;
1228 return(rcode); 1228 return rcode;
1229 } 1229 }
1230 } 1230 }
1231 } 1231 }
@@ -2768,7 +2768,7 @@ int hush_main(int argc, char **argv)
2768#endif 2768#endif
2769 2769
2770final_return: 2770final_return:
2771 return(opt?opt:last_return_code); 2771 return opt ? opt : last_return_code;
2772} 2772}
2773 2773
2774static char *insert_var_value(char *inp) 2774static char *insert_var_value(char *inp)
diff --git a/shell/msh.c b/shell/msh.c
index c0f013e98..8f58e9457 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -1007,13 +1007,13 @@ static int newfile(char *s)
1007 if (f < 0) { 1007 if (f < 0) {
1008 prs(s); 1008 prs(s);
1009 err(": cannot open"); 1009 err(": cannot open");
1010 return (1); 1010 return 1;
1011 } 1011 }
1012 } else 1012 } else
1013 f = 0; 1013 f = 0;
1014 1014
1015 next(remap(f)); 1015 next(remap(f));
1016 return (0); 1016 return 0;
1017} 1017}
1018 1018
1019 1019
@@ -1162,7 +1162,7 @@ static int newenv(int f)
1162 1162
1163 if (f) { 1163 if (f) {
1164 quitenv(); 1164 quitenv();
1165 return (1); 1165 return 1;
1166 } 1166 }
1167 1167
1168 ep = (struct env *) space(sizeof(*ep)); 1168 ep = (struct env *) space(sizeof(*ep));
@@ -1175,7 +1175,7 @@ static int newenv(int f)
1175 e.oenv = ep; 1175 e.oenv = ep;
1176 e.errpt = errpt; 1176 e.errpt = errpt;
1177 1177
1178 return (0); 1178 return 0;
1179} 1179}
1180 1180
1181static void quitenv(void) 1181static void quitenv(void)
@@ -1202,8 +1202,8 @@ static int anys(char *s1, char *s2)
1202{ 1202{
1203 while (*s1) 1203 while (*s1)
1204 if (any(*s1++, s2)) 1204 if (any(*s1++, s2))
1205 return (1); 1205 return 1;
1206 return (0); 1206 return 0;
1207} 1207}
1208 1208
1209/* 1209/*
@@ -1213,8 +1213,8 @@ static int any(int c, char *s)
1213{ 1213{
1214 while (*s) 1214 while (*s)
1215 if (*s++ == c) 1215 if (*s++ == c)
1216 return (1); 1216 return 1;
1217 return (0); 1217 return 0;
1218} 1218}
1219 1219
1220static char *putn(int n) 1220static char *putn(int n)
@@ -1396,12 +1396,12 @@ static int isassign(char *s)
1396 DBGPRINTF7(("ISASSIGN: enter, s=%s\n", s)); 1396 DBGPRINTF7(("ISASSIGN: enter, s=%s\n", s));
1397 1397
1398 if (!isalpha((int) *s) && *s != '_') 1398 if (!isalpha((int) *s) && *s != '_')
1399 return (0); 1399 return 0;
1400 for (; *s != '='; s++) 1400 for (; *s != '='; s++)
1401 if (*s == 0 || (!isalnum(*s) && *s != '_')) 1401 if (*s == 0 || (!isalnum(*s) && *s != '_'))
1402 return (0); 1402 return 0;
1403 1403
1404 return (1); 1404 return 1;
1405} 1405}
1406 1406
1407static int assign(char *s, int cf) 1407static int assign(char *s, int cf)
@@ -1412,15 +1412,15 @@ static int assign(char *s, int cf)
1412 DBGPRINTF7(("ASSIGN: enter, s=%s, cf=%d\n", s, cf)); 1412 DBGPRINTF7(("ASSIGN: enter, s=%s, cf=%d\n", s, cf));
1413 1413
1414 if (!isalpha(*s) && *s != '_') 1414 if (!isalpha(*s) && *s != '_')
1415 return (0); 1415 return 0;
1416 for (cp = s; *cp != '='; cp++) 1416 for (cp = s; *cp != '='; cp++)
1417 if (*cp == 0 || (!isalnum(*cp) && *cp != '_')) 1417 if (*cp == 0 || (!isalnum(*cp) && *cp != '_'))
1418 return (0); 1418 return 0;
1419 vp = lookup(s); 1419 vp = lookup(s);
1420 nameval(vp, ++cp, cf == COPYV ? (char *) NULL : s); 1420 nameval(vp, ++cp, cf == COPYV ? (char *) NULL : s);
1421 if (cf != COPYV) 1421 if (cf != COPYV)
1422 vp->status &= ~GETCELL; 1422 vp->status &= ~GETCELL;
1423 return (1); 1423 return 1;
1424} 1424}
1425 1425
1426static int checkname(char *cp) 1426static int checkname(char *cp)
@@ -1428,11 +1428,11 @@ static int checkname(char *cp)
1428 DBGPRINTF7(("CHECKNAME: enter, cp=%s\n", cp)); 1428 DBGPRINTF7(("CHECKNAME: enter, cp=%s\n", cp));
1429 1429
1430 if (!isalpha(*cp++) && *(cp - 1) != '_') 1430 if (!isalpha(*cp++) && *(cp - 1) != '_')
1431 return (0); 1431 return 0;
1432 while (*cp) 1432 while (*cp)
1433 if (!isalnum(*cp++) && *(cp - 1) != '_') 1433 if (!isalnum(*cp++) && *(cp - 1) != '_')
1434 return (0); 1434 return 0;
1435 return (1); 1435 return 1;
1436} 1436}
1437 1437
1438static void putvlist(int f, int out) 1438static void putvlist(int f, int out)
@@ -1454,7 +1454,7 @@ static int eqname(char *n1, char *n2)
1454{ 1454{
1455 for (; *n1 != '=' && *n1 != 0; n1++) 1455 for (; *n1 != '=' && *n1 != 0; n1++)
1456 if (*n2++ != *n1) 1456 if (*n2++ != *n1)
1457 return (0); 1457 return 0;
1458 return (*n2 == 0 || *n2 == '='); 1458 return (*n2 == 0 || *n2 == '=');
1459} 1459}
1460 1460
@@ -1483,31 +1483,31 @@ static int gmatch(char *s, char *p)
1483 int sc, pc; 1483 int sc, pc;
1484 1484
1485 if (s == NULL || p == NULL) 1485 if (s == NULL || p == NULL)
1486 return (0); 1486 return 0;
1487 while ((pc = *p++ & CMASK) != '\0') { 1487 while ((pc = *p++ & CMASK) != '\0') {
1488 sc = *s++ & QMASK; 1488 sc = *s++ & QMASK;
1489 switch (pc) { 1489 switch (pc) {
1490 case '[': 1490 case '[':
1491 if ((p = cclass(p, sc)) == NULL) 1491 if ((p = cclass(p, sc)) == NULL)
1492 return (0); 1492 return 0;
1493 break; 1493 break;
1494 1494
1495 case '?': 1495 case '?':
1496 if (sc == 0) 1496 if (sc == 0)
1497 return (0); 1497 return 0;
1498 break; 1498 break;
1499 1499
1500 case '*': 1500 case '*':
1501 s--; 1501 s--;
1502 do { 1502 do {
1503 if (*p == '\0' || gmatch(s, p)) 1503 if (*p == '\0' || gmatch(s, p))
1504 return (1); 1504 return 1;
1505 } while (*s++ != '\0'); 1505 } while (*s++ != '\0');
1506 return (0); 1506 return 0;
1507 1507
1508 default: 1508 default:
1509 if (sc != (pc & ~QUOTE)) 1509 if (sc != (pc & ~QUOTE))
1510 return (0); 1510 return 0;
1511 } 1511 }
1512 } 1512 }
1513 return (*s == 0); 1513 return (*s == 0);
@@ -1805,7 +1805,7 @@ static int synio(int cf)
1805 1805
1806 if ((c = yylex(cf)) != '<' && c != '>') { 1806 if ((c = yylex(cf)) != '<' && c != '>') {
1807 peeksym = c; 1807 peeksym = c;
1808 return (0); 1808 return 0;
1809 } 1809 }
1810 1810
1811 i = yylval.i; 1811 i = yylval.i;
@@ -1817,7 +1817,7 @@ static int synio(int cf)
1817 markhere(yylval.cp, iop); 1817 markhere(yylval.cp, iop);
1818 1818
1819 DBGPRINTF7(("SYNIO: returning 1\n")); 1819 DBGPRINTF7(("SYNIO: returning 1\n"));
1820 return (1); 1820 return 1;
1821} 1821}
1822 1822
1823static void musthave(int c, int cf) 1823static void musthave(int c, int cf)
@@ -2166,7 +2166,7 @@ static int rlookup(char *n)
2166 } 2166 }
2167 2167
2168 DBGPRINTF7(("RLOOKUP: NO match, returning 0\n")); 2168 DBGPRINTF7(("RLOOKUP: NO match, returning 0\n"));
2169 return (0); /* Not a shell multiline */ 2169 return 0; /* Not a shell multiline */
2170} 2170}
2171 2171
2172static struct op *newtp(void) 2172static struct op *newtp(void)
@@ -2428,7 +2428,7 @@ static int collect(int c, int c1)
2428 2428
2429 DBGPRINTF8(("COLLECT: return 0, line is %s\n", line)); 2429 DBGPRINTF8(("COLLECT: return 0, line is %s\n", line));
2430 2430
2431 return (0); 2431 return 0;
2432} 2432}
2433 2433
2434/* "multiline commands" helper func */ 2434/* "multiline commands" helper func */
@@ -2510,7 +2510,7 @@ static int execute(struct op *t, int *pin, int *pout, int act)
2510 2510
2511 if (t == NULL) { 2511 if (t == NULL) {
2512 DBGPRINTF4(("EXECUTE: enter, t==null, returning.\n")); 2512 DBGPRINTF4(("EXECUTE: enter, t==null, returning.\n"));
2513 return (0); 2513 return 0;
2514 } 2514 }
2515 2515
2516 DBGPRINTF(("EXECUTE: t=%p, t->type=%d (%s), t->words is %s\n", t, 2516 DBGPRINTF(("EXECUTE: t=%p, t->type=%d (%s), t->words is %s\n", t,
@@ -2787,7 +2787,7 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2787 2787
2788 if (newpid == -1) { 2788 if (newpid == -1) {
2789 DBGPRINTF(("FORKEXEC: ERROR, cannot vfork()!\n")); 2789 DBGPRINTF(("FORKEXEC: ERROR, cannot vfork()!\n"));
2790 return (-1); 2790 return -1;
2791 } 2791 }
2792 2792
2793 2793
@@ -2804,7 +2804,7 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2804 2804
2805/* moved up 2805/* moved up
2806 if (i == -1) 2806 if (i == -1)
2807 return(rv); 2807 return rv;
2808*/ 2808*/
2809 2809
2810 if (pin != NULL) 2810 if (pin != NULL)
@@ -2839,7 +2839,7 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2839 err("piping to/from shell builtins not yet done"); 2839 err("piping to/from shell builtins not yet done");
2840 if (forked) 2840 if (forked)
2841 _exit(-1); 2841 _exit(-1);
2842 return (-1); 2842 return -1;
2843 } 2843 }
2844#endif 2844#endif
2845 2845
@@ -2858,7 +2858,7 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2858 err(": cannot redirect shell command"); 2858 err(": cannot redirect shell command");
2859 if (forked) 2859 if (forked)
2860 _exit(-1); 2860 _exit(-1);
2861 return (-1); 2861 return -1;
2862 } 2862 }
2863 while (*iopp) 2863 while (*iopp)
2864 if (iosetup(*iopp++, pin != NULL, pout != NULL)) { 2864 if (iosetup(*iopp++, pin != NULL, pout != NULL)) {
@@ -2919,23 +2919,23 @@ static int iosetup(struct ioword *iop, int pipein, int pipeout)
2919 iop->io_unit = iop->io_flag & (IOREAD | IOHERE) ? 0 : 1; 2919 iop->io_unit = iop->io_flag & (IOREAD | IOHERE) ? 0 : 1;
2920 2920
2921 if (pipein && iop->io_unit == 0) 2921 if (pipein && iop->io_unit == 0)
2922 return (0); 2922 return 0;
2923 2923
2924 if (pipeout && iop->io_unit == 1) 2924 if (pipeout && iop->io_unit == 1)
2925 return (0); 2925 return 0;
2926 2926
2927 msg = iop->io_flag & (IOREAD | IOHERE) ? "open" : "create"; 2927 msg = iop->io_flag & (IOREAD | IOHERE) ? "open" : "create";
2928 if ((iop->io_flag & IOHERE) == 0) { 2928 if ((iop->io_flag & IOHERE) == 0) {
2929 cp = iop->io_name; 2929 cp = iop->io_name;
2930 if ((cp = evalstr(cp, DOSUB | DOTRIM)) == NULL) 2930 if ((cp = evalstr(cp, DOSUB | DOTRIM)) == NULL)
2931 return (1); 2931 return 1;
2932 } 2932 }
2933 2933
2934 if (iop->io_flag & IODUP) { 2934 if (iop->io_flag & IODUP) {
2935 if (cp[1] || (!isdigit(*cp) && *cp != '-')) { 2935 if (cp[1] || (!isdigit(*cp) && *cp != '-')) {
2936 prs(cp); 2936 prs(cp);
2937 err(": illegal >& argument"); 2937 err(": illegal >& argument");
2938 return (1); 2938 return 1;
2939 } 2939 }
2940 if (*cp == '-') 2940 if (*cp == '-')
2941 iop->io_flag = IOCLOSE; 2941 iop->io_flag = IOCLOSE;
@@ -2967,20 +2967,20 @@ static int iosetup(struct ioword *iop, int pipein, int pipeout)
2967 2967
2968 case IOCLOSE: 2968 case IOCLOSE:
2969 close(iop->io_unit); 2969 close(iop->io_unit);
2970 return (0); 2970 return 0;
2971 } 2971 }
2972 if (u < 0) { 2972 if (u < 0) {
2973 prs(cp); 2973 prs(cp);
2974 prs(": cannot "); 2974 prs(": cannot ");
2975 warn(msg); 2975 warn(msg);
2976 return (1); 2976 return 1;
2977 } else { 2977 } else {
2978 if (u != iop->io_unit) { 2978 if (u != iop->io_unit) {
2979 dup2(u, iop->io_unit); 2979 dup2(u, iop->io_unit);
2980 close(u); 2980 close(u);
2981 } 2981 }
2982 } 2982 }
2983 return (0); 2983 return 0;
2984} 2984}
2985 2985
2986static void echo(char **wp) 2986static void echo(char **wp)
@@ -3281,7 +3281,7 @@ static int dohelp(struct op *t)
3281 3281
3282static int dolabel(struct op *t) 3282static int dolabel(struct op *t)
3283{ 3283{
3284 return (0); 3284 return 0;
3285} 3285}
3286 3286
3287static int dochdir(struct op *t) 3287static int dochdir(struct op *t)
@@ -3293,10 +3293,10 @@ static int dochdir(struct op *t)
3293 else if (chdir(cp) < 0) 3293 else if (chdir(cp) < 0)
3294 er = ": bad directory"; 3294 er = ": bad directory";
3295 else 3295 else
3296 return (0); 3296 return 0;
3297 prs(cp != NULL ? cp : "cd"); 3297 prs(cp != NULL ? cp : "cd");
3298 err(er); 3298 err(er);
3299 return (1); 3299 return 1;
3300} 3300}
3301 3301
3302static int doshift(struct op *t) 3302static int doshift(struct op *t)
@@ -3306,13 +3306,13 @@ static int doshift(struct op *t)
3306 n = t->words[1] ? getn(t->words[1]) : 1; 3306 n = t->words[1] ? getn(t->words[1]) : 1;
3307 if (dolc < n) { 3307 if (dolc < n) {
3308 err("nothing to shift"); 3308 err("nothing to shift");
3309 return (1); 3309 return 1;
3310 } 3310 }
3311 dolv[n] = dolv[0]; 3311 dolv[n] = dolv[0];
3312 dolv += n; 3312 dolv += n;
3313 dolc -= n; 3313 dolc -= n;
3314 setval(lookup("#"), putn(dolc)); 3314 setval(lookup("#"), putn(dolc));
3315 return (0); 3315 return 0;
3316} 3316}
3317 3317
3318/* 3318/*
@@ -3330,7 +3330,7 @@ static int dologin(struct op *t)
3330 prs(t->words[0]); 3330 prs(t->words[0]);
3331 prs(": "); 3331 prs(": ");
3332 err(cp); 3332 err(cp);
3333 return (1); 3333 return 1;
3334} 3334}
3335 3335
3336static int doumask(struct op *t) 3336static int doumask(struct op *t)
@@ -3349,7 +3349,7 @@ static int doumask(struct op *t)
3349 n = n * 8 + (*cp - '0'); 3349 n = n * 8 + (*cp - '0');
3350 umask(n); 3350 umask(n);
3351 } 3351 }
3352 return (0); 3352 return 0;
3353} 3353}
3354 3354
3355static int doexec(struct op *t) 3355static int doexec(struct op *t)
@@ -3361,14 +3361,14 @@ static int doexec(struct op *t)
3361 t->ioact = NULL; 3361 t->ioact = NULL;
3362 for (i = 0; (t->words[i] = t->words[i + 1]) != NULL; i++); 3362 for (i = 0; (t->words[i] = t->words[i + 1]) != NULL; i++);
3363 if (i == 0) 3363 if (i == 0)
3364 return (1); 3364 return 1;
3365 execflg = 1; 3365 execflg = 1;
3366 ofail = failpt; 3366 ofail = failpt;
3367 if (setjmp(failpt = ex) == 0) 3367 if (setjmp(failpt = ex) == 0)
3368 execute(t, NOPIPE, NOPIPE, FEXEC); 3368 execute(t, NOPIPE, NOPIPE, FEXEC);
3369 failpt = ofail; 3369 failpt = ofail;
3370 execflg = 0; 3370 execflg = 0;
3371 return (1); 3371 return 1;
3372} 3372}
3373 3373
3374static int dodot(struct op *t) 3374static int dodot(struct op *t)
@@ -3382,7 +3382,7 @@ static int dodot(struct op *t)
3382 3382
3383 if ((cp = t->words[1]) == NULL) { 3383 if ((cp = t->words[1]) == NULL) {
3384 DBGPRINTF(("DODOT: bad args, ret 0\n")); 3384 DBGPRINTF(("DODOT: bad args, ret 0\n"));
3385 return (0); 3385 return 0;
3386 } else { 3386 } else {
3387 DBGPRINTF(("DODOT: cp is %s\n", cp)); 3387 DBGPRINTF(("DODOT: cp is %s\n", cp));
3388 } 3388 }
@@ -3420,7 +3420,7 @@ static int dodot(struct op *t)
3420 prs(cp); 3420 prs(cp);
3421 err(": not found"); 3421 err(": not found");
3422 3422
3423 return (-1); 3423 return -1;
3424} 3424}
3425 3425
3426static int dowait(struct op *t) 3426static int dowait(struct op *t)
@@ -3431,11 +3431,11 @@ static int dowait(struct op *t)
3431 if ((cp = t->words[1]) != NULL) { 3431 if ((cp = t->words[1]) != NULL) {
3432 i = getn(cp); 3432 i = getn(cp);
3433 if (i == 0) 3433 if (i == 0)
3434 return (0); 3434 return 0;
3435 } else 3435 } else
3436 i = -1; 3436 i = -1;
3437 setstatus(waitfor(i, 1)); 3437 setstatus(waitfor(i, 1));
3438 return (0); 3438 return 0;
3439} 3439}
3440 3440
3441static int doread(struct op *t) 3441static int doread(struct op *t)
@@ -3446,7 +3446,7 @@ static int doread(struct op *t)
3446 3446
3447 if (t->words[1] == NULL) { 3447 if (t->words[1] == NULL) {
3448 err("Usage: read name ..."); 3448 err("Usage: read name ...");
3449 return (1); 3449 return 1;
3450 } 3450 }
3451 for (wp = t->words + 1; *wp; wp++) { 3451 for (wp = t->words + 1; *wp; wp++) {
3452 for (cp = e.linep; !nl && cp < elinep - 1; cp++) 3452 for (cp = e.linep; !nl && cp < elinep - 1; cp++)
@@ -3479,7 +3479,7 @@ static int dotrap(struct op *t)
3479 prs(trap[i]); 3479 prs(trap[i]);
3480 prs("\n"); 3480 prs("\n");
3481 } 3481 }
3482 return (0); 3482 return 0;
3483 } 3483 }
3484 resetsig = isdigit(*t->words[1]); 3484 resetsig = isdigit(*t->words[1]);
3485 for (i = resetsig ? 1 : 2; t->words[i] != NULL; ++i) { 3485 for (i = resetsig ? 1 : 2; t->words[i] != NULL; ++i) {
@@ -3502,7 +3502,7 @@ static int dotrap(struct op *t)
3502 setsig(n, SIG_DFL); 3502 setsig(n, SIG_DFL);
3503 } 3503 }
3504 } 3504 }
3505 return (0); 3505 return 0;
3506} 3506}
3507 3507
3508static int getsig(char *s) 3508static int getsig(char *s)
@@ -3571,7 +3571,7 @@ static int brkcontin(char *cp, int val)
3571 } while (--nl); 3571 } while (--nl);
3572 if (nl) { 3572 if (nl) {
3573 err("bad break/continue level"); 3573 err("bad break/continue level");
3574 return (1); 3574 return 1;
3575 } 3575 }
3576 isbreak = val; 3576 isbreak = val;
3577 longjmp(bc->brkpt, 1); 3577 longjmp(bc->brkpt, 1);
@@ -3590,19 +3590,19 @@ static int doexit(struct op *t)
3590 3590
3591 leave(); 3591 leave();
3592 /* NOTREACHED */ 3592 /* NOTREACHED */
3593 return (0); 3593 return 0;
3594} 3594}
3595 3595
3596static int doexport(struct op *t) 3596static int doexport(struct op *t)
3597{ 3597{
3598 rdexp(t->words + 1, export, EXPORT); 3598 rdexp(t->words + 1, export, EXPORT);
3599 return (0); 3599 return 0;
3600} 3600}
3601 3601
3602static int doreadonly(struct op *t) 3602static int doreadonly(struct op *t)
3603{ 3603{
3604 rdexp(t->words + 1, ronly, RONLY); 3604 rdexp(t->words + 1, ronly, RONLY);
3605 return (0); 3605 return 0;
3606} 3606}
3607 3607
3608static void rdexp(char **wp, void (*f) (struct var *), int key) 3608static void rdexp(char **wp, void (*f) (struct var *), int key)
@@ -3643,7 +3643,7 @@ static int doset(struct op *t)
3643 if ((cp = t->words[1]) == NULL) { 3643 if ((cp = t->words[1]) == NULL) {
3644 for (vp = vlist; vp; vp = vp->next) 3644 for (vp = vlist; vp; vp = vp->next)
3645 varput(vp->name, 1); 3645 varput(vp->name, 1);
3646 return (0); 3646 return 0;
3647 } 3647 }
3648 if (*cp == '-') { 3648 if (*cp == '-') {
3649 /* bad: t->words++; */ 3649 /* bad: t->words++; */
@@ -3674,7 +3674,7 @@ static int doset(struct op *t)
3674 setval(lookup("#"), putn(dolc)); 3674 setval(lookup("#"), putn(dolc));
3675 setarea((char *) (dolv - 1), 0); 3675 setarea((char *) (dolv - 1), 0);
3676 } 3676 }
3677 return (0); 3677 return 0;
3678} 3678}
3679 3679
3680static void varput(char *s, int out) 3680static void varput(char *s, int out)
@@ -3818,7 +3818,7 @@ static int expand(char *cp, struct wdblock **wbp, int f)
3818 gflg = 0; 3818 gflg = 0;
3819 3819
3820 if (cp == NULL) 3820 if (cp == NULL)
3821 return (0); 3821 return 0;
3822 3822
3823 if (!anys("$`'\"", cp) && 3823 if (!anys("$`'\"", cp) &&
3824 !anys(ifs->value, cp) && ((f & DOGLOB) == 0 || !anys("[*?", cp))) { 3824 !anys(ifs->value, cp) && ((f & DOGLOB) == 0 || !anys("[*?", cp))) {
@@ -3826,7 +3826,7 @@ static int expand(char *cp, struct wdblock **wbp, int f)
3826 if (f & DOTRIM) 3826 if (f & DOTRIM)
3827 unquote(cp); 3827 unquote(cp);
3828 *wbp = addword(cp, *wbp); 3828 *wbp = addword(cp, *wbp);
3829 return (1); 3829 return 1;
3830 } 3830 }
3831 if (newenv(setjmp(errpt = ev)) == 0) { 3831 if (newenv(setjmp(errpt = ev)) == 0) {
3832 PUSHIO(aword, cp, strchar); 3832 PUSHIO(aword, cp, strchar);
@@ -3866,7 +3866,7 @@ static char *blank(int f)
3866 switch (c = subgetc('"', foundequals)) { 3866 switch (c = subgetc('"', foundequals)) {
3867 case 0: 3867 case 0:
3868 if (sp == e.linep) 3868 if (sp == e.linep)
3869 return (0); 3869 return 0;
3870 *e.linep++ = 0; 3870 *e.linep++ = 0;
3871 return (sp); 3871 return (sp);
3872 3872
@@ -3930,7 +3930,7 @@ static int subgetc(char ec, int quoted)
3930 if (!INSUB() && ec != '\'') { 3930 if (!INSUB() && ec != '\'') {
3931 if (c == '`') { 3931 if (c == '`') {
3932 if (grave(quoted) == 0) 3932 if (grave(quoted) == 0)
3933 return (0); 3933 return 0;
3934 e.iop->task = XGRAVE; 3934 e.iop->task = XGRAVE;
3935 goto again; 3935 goto again;
3936 } 3936 }
@@ -4001,7 +4001,7 @@ static int dollar(int quoted)
4001 /* should check dollar */ 4001 /* should check dollar */
4002 e.linep = s; 4002 e.linep = s;
4003 PUSHIO(awordlist, dolv + 1, dolchar); 4003 PUSHIO(awordlist, dolv + 1, dolchar);
4004 return (0); 4004 return 0;
4005 } else { /* trap the nasty ${=} */ 4005 } else { /* trap the nasty ${=} */
4006 s[0] = '1'; 4006 s[0] = '1';
4007 s[1] = 0; 4007 s[1] = 0;
@@ -4042,7 +4042,7 @@ static int dollar(int quoted)
4042 } 4042 }
4043 e.linep = s; 4043 e.linep = s;
4044 PUSHIO(aword, dolp, quoted ? qstrchar : strchar); 4044 PUSHIO(aword, dolp, quoted ? qstrchar : strchar);
4045 return (0); 4045 return 0;
4046} 4046}
4047 4047
4048/* 4048/*
@@ -4072,7 +4072,7 @@ static int grave(int quoted)
4072 for (cp = e.iop->argp->aword; *cp != '`'; cp++) 4072 for (cp = e.iop->argp->aword; *cp != '`'; cp++)
4073 if (*cp == 0) { 4073 if (*cp == 0) {
4074 err("no closing `"); 4074 err("no closing `");
4075 return (0); 4075 return 0;
4076 } 4076 }
4077 4077
4078 /* string copy with dollar expansion */ 4078 /* string copy with dollar expansion */
@@ -4119,7 +4119,7 @@ static int grave(int quoted)
4119 break; 4119 break;
4120 default: 4120 default:
4121 err("unclosed ${\n"); 4121 err("unclosed ${\n");
4122 return (0); 4122 return 0;
4123 } 4123 }
4124 if (operator) { 4124 if (operator) {
4125 src++; 4125 src++;
@@ -4129,7 +4129,7 @@ static int grave(int quoted)
4129 alt_value[alt_index] = 0; 4129 alt_value[alt_index] = 0;
4130 if (*src != '}') { 4130 if (*src != '}') {
4131 err("unclosed ${\n"); 4131 err("unclosed ${\n");
4132 return (0); 4132 return 0;
4133 } 4133 }
4134 } 4134 }
4135 src++; 4135 src++;
@@ -4164,7 +4164,7 @@ static int grave(int quoted)
4164 alt_value : vp->value; 4164 alt_value : vp->value;
4165 else if (operator == '?') { 4165 else if (operator == '?') {
4166 err(alt_value); 4166 err(alt_value);
4167 return (0); 4167 return 0;
4168 } else if (alt_index && (operator != '+')) { 4168 } else if (alt_index && (operator != '+')) {
4169 value = alt_value; 4169 value = alt_value;
4170 if (operator == '=') 4170 if (operator == '=')
@@ -4186,7 +4186,7 @@ static int grave(int quoted)
4186 *dest = '\0'; 4186 *dest = '\0';
4187 4187
4188 if (openpipe(pf) < 0) 4188 if (openpipe(pf) < 0)
4189 return (0); 4189 return 0;
4190 4190
4191 while ((i = vfork()) == -1 && errno == EAGAIN); 4191 while ((i = vfork()) == -1 && errno == EAGAIN);
4192 4192
@@ -4195,7 +4195,7 @@ static int grave(int quoted)
4195 if (i < 0) { 4195 if (i < 0) {
4196 closepipe(pf); 4196 closepipe(pf);
4197 err((char *) bb_msg_memory_exhausted); 4197 err((char *) bb_msg_memory_exhausted);
4198 return (0); 4198 return 0;
4199 } 4199 }
4200 if (i != 0) { 4200 if (i != 0) {
4201 waitpid(i, NULL, 0); 4201 waitpid(i, NULL, 0);
@@ -4204,7 +4204,7 @@ static int grave(int quoted)
4204 PUSHIO(afile, remap(pf[0]), 4204 PUSHIO(afile, remap(pf[0]),
4205 (int (*)(struct ioarg *)) ((quoted) ? qgravechar : 4205 (int (*)(struct ioarg *)) ((quoted) ? qgravechar :
4206 gravechar)); 4206 gravechar));
4207 return (1); 4207 return 1;
4208 } 4208 }
4209 /* allow trapped signals */ 4209 /* allow trapped signals */
4210 /* XXX - Maybe this signal stuff should go as well? */ 4210 /* XXX - Maybe this signal stuff should go as well? */
@@ -4379,8 +4379,8 @@ static int anyspcl(struct wdblock *wb)
4379 wd = wb->w_words; 4379 wd = wb->w_words;
4380 for (i = 0; i < wb->w_nword; i++) 4380 for (i = 0; i < wb->w_nword; i++)
4381 if (anys(spcl, *wd++)) 4381 if (anys(spcl, *wd++))
4382 return (1); 4382 return 1;
4383 return (0); 4383 return 0;
4384} 4384}
4385 4385
4386static int xstrcmp(char *p1, char *p2) 4386static int xstrcmp(char *p1, char *p2)
@@ -4634,14 +4634,14 @@ static int readc(void)
4634 4634
4635 if (e.iop >= iostack) { 4635 if (e.iop >= iostack) {
4636 RCPRINTF(("READC: return 0, e.iop %p\n", e.iop)); 4636 RCPRINTF(("READC: return 0, e.iop %p\n", e.iop));
4637 return (0); 4637 return 0;
4638 } 4638 }
4639 4639
4640 DBGPRINTF(("READC: leave()...\n")); 4640 DBGPRINTF(("READC: leave()...\n"));
4641 leave(); 4641 leave();
4642 4642
4643 /* NOTREACHED */ 4643 /* NOTREACHED */
4644 return (0); 4644 return 0;
4645} 4645}
4646 4646
4647static void ioecho(char c) 4647static void ioecho(char c)
@@ -4737,7 +4737,7 @@ static int nlchar(struct ioarg *ap)
4737 int c; 4737 int c;
4738 4738
4739 if (ap->aword == NULL) 4739 if (ap->aword == NULL)
4740 return (0); 4740 return 0;
4741 if ((c = *ap->aword++) == 0) { 4741 if ((c = *ap->aword++) == 0) {
4742 ap->aword = NULL; 4742 ap->aword = NULL;
4743 return ('\n'); 4743 return ('\n');
@@ -4755,7 +4755,7 @@ static int wdchar(struct ioarg *ap)
4755 char **wl; 4755 char **wl;
4756 4756
4757 if ((wl = ap->awordlist) == NULL) 4757 if ((wl = ap->awordlist) == NULL)
4758 return (0); 4758 return 0;
4759 if (*wl != NULL) { 4759 if (*wl != NULL) {
4760 if ((c = *(*wl)++) != 0) 4760 if ((c = *(*wl)++) != 0)
4761 return (c & 0177); 4761 return (c & 0177);
@@ -4776,9 +4776,9 @@ static int dolchar(struct ioarg *ap)
4776 4776
4777 if ((wp = *ap->awordlist++) != NULL) { 4777 if ((wp = *ap->awordlist++) != NULL) {
4778 PUSHIO(aword, wp, *ap->awordlist == NULL ? strchar : xxchar); 4778 PUSHIO(aword, wp, *ap->awordlist == NULL ? strchar : xxchar);
4779 return (-1); 4779 return -1;
4780 } 4780 }
4781 return (0); 4781 return 0;
4782} 4782}
4783 4783
4784static int xxchar(struct ioarg *ap) 4784static int xxchar(struct ioarg *ap)
@@ -4786,7 +4786,7 @@ static int xxchar(struct ioarg *ap)
4786 int c; 4786 int c;
4787 4787
4788 if (ap->aword == NULL) 4788 if (ap->aword == NULL)
4789 return (0); 4789 return 0;
4790 if ((c = *ap->aword++) == '\0') { 4790 if ((c = *ap->aword++) == '\0') {
4791 ap->aword = NULL; 4791 ap->aword = NULL;
4792 return (' '); 4792 return (' ');
@@ -4802,7 +4802,7 @@ static int strchar(struct ioarg *ap)
4802 int c; 4802 int c;
4803 4803
4804 if (ap->aword == NULL || (c = *ap->aword++) == 0) 4804 if (ap->aword == NULL || (c = *ap->aword++) == 0)
4805 return (0); 4805 return 0;
4806 return (c); 4806 return (c);
4807} 4807}
4808 4808
@@ -4814,7 +4814,7 @@ static int qstrchar(struct ioarg *ap)
4814 int c; 4814 int c;
4815 4815
4816 if (ap->aword == NULL || (c = *ap->aword++) == 0) 4816 if (ap->aword == NULL || (c = *ap->aword++) == 0)
4817 return (0); 4817 return 0;
4818 return (c | QUOTE); 4818 return (c | QUOTE);
4819} 4819}
4820 4820
@@ -5143,13 +5143,13 @@ static int herein(char *hname, int xdoll)
5143 (void) &tf; 5143 (void) &tf;
5144#endif 5144#endif
5145 if (hname == NULL) 5145 if (hname == NULL)
5146 return (-1); 5146 return -1;
5147 5147
5148 DBGPRINTF7(("HEREIN: hname is %s, xdoll=%d\n", hname, xdoll)); 5148 DBGPRINTF7(("HEREIN: hname is %s, xdoll=%d\n", hname, xdoll));
5149 5149
5150 hf = open(hname, 0); 5150 hf = open(hname, 0);
5151 if (hf < 0) 5151 if (hf < 0)
5152 return (-1); 5152 return -1;
5153 5153
5154 if (xdoll) { 5154 if (xdoll) {
5155 char c; 5155 char c;
@@ -5158,7 +5158,7 @@ static int herein(char *hname, int xdoll)
5158 5158
5159 tf = mkstemp(tname); 5159 tf = mkstemp(tname);
5160 if (tf < 0) 5160 if (tf < 0)
5161 return (-1); 5161 return -1;
5162 if (newenv(setjmp(errpt = ev)) == 0) { 5162 if (newenv(setjmp(errpt = ev)) == 0) {
5163 PUSHIO(afile, hf, herechar); 5163 PUSHIO(afile, hf, herechar);
5164 setbase(e.iop); 5164 setbase(e.iop);
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 645b0b929..12105953d 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -55,7 +55,7 @@ static time_t askremotedate(const char *host)
55 * Subtract the RFC 868 time to get Linux epoch 55 * Subtract the RFC 868 time to get Linux epoch
56 */ 56 */
57 57
58 return(ntohl(nett) - RFC_868_BIAS); 58 return ntohl(nett) - RFC_868_BIAS;
59} 59}
60 60
61int rdate_main(int argc, char **argv) 61int rdate_main(int argc, char **argv)