summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 751e879..73651ba 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -82,5 +82,5 @@ int cpio_main(int argc, char **argv)
while (get_header_cpio(archive_handle) == EXIT_SUCCESS);
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 80a5f32..d11d9df 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -90,7 +90,7 @@ int dpkg_deb_main(int argc, char **argv)
unpack_ar_archive(ar_archive);
/* Cleanup */
- close (ar_archive->src_fd);
+ close(ar_archive->src_fd);
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index 9e3e98d..621d84c 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
bytebuffer_offset++;
*current += 8;
}
- return(bitbuffer);
+ return bitbuffer;
}
/*
diff --git a/archival/libunarchive/filter_accept_all.c b/archival/libunarchive/filter_accept_all.c
index e2ff06d..5c991ca 100644
--- a/archival/libunarchive/filter_accept_all.c
+++ b/archival/libunarchive/filter_accept_all.c
@@ -11,9 +11,7 @@
/* Accept any non-null name, its not really a filter at all */
char filter_accept_all(archive_handle_t *archive_handle)
{
- if (archive_handle->file_header->name) {
- return(EXIT_SUCCESS);
- } else {
- return(EXIT_FAILURE);
- }
+ if (archive_handle->file_header->name)
+ return EXIT_SUCCESS;
+ return EXIT_FAILURE;
}
diff --git a/archival/libunarchive/filter_accept_list.c b/archival/libunarchive/filter_accept_list.c
index 253021a..cfc1b0c 100644
--- a/archival/libunarchive/filter_accept_list.c
+++ b/archival/libunarchive/filter_accept_list.c
@@ -13,9 +13,7 @@
*/
char filter_accept_list(archive_handle_t *archive_handle)
{
- if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) {
- return(EXIT_SUCCESS);
- } else {
- return(EXIT_FAILURE);
- }
+ if (find_list_entry(archive_handle->accept, archive_handle->file_header->name))
+ return EXIT_SUCCESS;
+ return EXIT_FAILURE;
}
diff --git a/archival/libunarchive/filter_accept_list_reassign.c b/archival/libunarchive/filter_accept_list_reassign.c
index c26f2e0..04b6780 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)
#ifdef CONFIG_FEATURE_DEB_TAR_GZ
if (strcmp(name_ptr, ".gz") == 0) {
archive_handle->action_data_subarchive = get_header_tar_gz;
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
#endif
#ifdef CONFIG_FEATURE_DEB_TAR_BZ2
if (strcmp(name_ptr, ".bz2") == 0) {
archive_handle->action_data_subarchive = get_header_tar_bz2;
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
#endif
if (ENABLE_FEATURE_DEB_TAR_LZMA && !strcmp(name_ptr, ".lzma")) {
archive_handle->action_data_subarchive = get_header_tar_lzma;
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
}
- return(EXIT_FAILURE);
+ return EXIT_FAILURE;
}
diff --git a/archival/libunarchive/filter_accept_reject_list.c b/archival/libunarchive/filter_accept_reject_list.c
index a3a938c..79da350 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)
/* If the key is in a reject list fail */
if (reject_entry) {
- return(EXIT_FAILURE);
+ return EXIT_FAILURE;
}
accept_entry = find_list_entry2(archive_handle->accept, key);
/* Fail if an accept list was specified and the key wasnt in there */
if ((accept_entry == NULL) && archive_handle->accept) {
- return(EXIT_FAILURE);
+ return EXIT_FAILURE;
}
/* Accepted */
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c
index 0d040e3..d0791e9 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)
/* dont use xread as we want to handle the error ourself */
if (read(archive_handle->src_fd, ar.raw, 60) != 60) {
/* End Of File */
- return(EXIT_FAILURE);
+ return EXIT_FAILURE;
}
/* ar header starts on an even byte (2 byte aligned)
@@ -108,5 +108,5 @@ char get_header_ar(archive_handle_t *archive_handle)
/* Set the file pointer to the correct spot, we may have been reading a compressed file */
lseek(archive_handle->src_fd, archive_handle->offset, SEEK_SET);
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
diff --git a/coreutils/diff.c b/coreutils/diff.c
index f26bcca..2920bf1 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -183,7 +183,7 @@ static int readhash(FILE * f)
for (i = 0; (t = getc(f)) != '\n'; i++) {
if (t == EOF) {
if (i == 0)
- return (0);
+ return 0;
break;
}
sum = sum * 127 + t;
@@ -191,7 +191,7 @@ static int readhash(FILE * f)
for (i = 0; (t = getc(f)) != '\n'; i++) {
if (t == EOF) {
if (i == 0)
- return (0);
+ return 0;
break;
}
sum = sum * 127 + t;
@@ -216,7 +216,7 @@ static int readhash(FILE * f)
continue;
case EOF:
if (i == 0)
- return (0);
+ return 0;
/* FALLTHROUGH */
case '\n':
break;
@@ -244,19 +244,19 @@ static int files_differ(FILE * f1, FILE * f2, int flags)
if ((flags & (D_EMPTY1 | D_EMPTY2)) || stb1.st_size != stb2.st_size ||
(stb1.st_mode & S_IFMT) != (stb2.st_mode & S_IFMT))
- return (1);
+ return 1;
while (1) {
i = fread(buf1, 1, sizeof(buf1), f1);
j = fread(buf2, 1, sizeof(buf2), f2);
if (i != j)
- return (1);
+ return 1;
if (i == 0 && j == 0) {
if (ferror(f1) || ferror(f2))
- return (1);
- return (0);
+ return 1;
+ return 0;
}
if (memcmp(buf1, buf2, i) != 0)
- return (1);
+ return 1;
}
}
@@ -333,7 +333,7 @@ static int isqrt(int n)
int y, x = 1;
if (n == 0)
- return (0);
+ return 0;
do {
y = x;
@@ -610,7 +610,7 @@ static int fetch(long *f, int a, int b, FILE * lb, int ch)
int i, j, c, lastc, col, nc;
if (a > b)
- return (0);
+ return 0;
for (i = a; i <= b; i++) {
fseek(lb, f[i - 1], SEEK_SET);
nc = f[i] - f[i - 1];
@@ -623,7 +623,7 @@ static int fetch(long *f, int a, int b, FILE * lb, int ch)
for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) {
if ((c = getc(lb)) == EOF) {
puts("\n\\ No newline at end of file");
- return (0);
+ return 0;
}
if (c == '\t' && (cmd_flags & FLAG_t)) {
do {
@@ -635,7 +635,7 @@ static int fetch(long *f, int a, int b, FILE * lb, int ch)
}
}
}
- return (0);
+ return 0;
}
static int asciifile(FILE * f)
@@ -646,18 +646,18 @@ static int asciifile(FILE * f)
#endif
if ((cmd_flags & FLAG_a) || f == NULL)
- return (1);
+ return 1;
#if ENABLE_FEATURE_DIFF_BINARY
rewind(f);
cnt = fread(buf, 1, sizeof(buf), f);
for (i = 0; i < cnt; i++) {
if (!isprint(buf[i]) && !isspace(buf[i])) {
- return (0);
+ return 0;
}
}
#endif
- return (1);
+ return 1;
}
/* dump accumulated "unified" diff changes */
diff --git a/coreutils/install.c b/coreutils/install.c
index 54adc2b..3e00390 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -92,7 +92,7 @@ int install_main(int argc, char **argv)
}
} while (old_argv_ptr);
}
- return(ret);
+ return ret;
}
{
@@ -127,5 +127,5 @@ int install_main(int argc, char **argv)
if(ENABLE_FEATURE_CLEAN_UP && isdir) free(dest);
}
- return(ret);
+ return ret;
}
diff --git a/coreutils/sync.c b/coreutils/sync.c
index 8a7f182..59f0b50 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -19,5 +19,5 @@ int sync_main(int argc, char **argv)
sync();
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
diff --git a/coreutils/test.c b/coreutils/test.c
index c1097c2..ebb4f90 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -520,17 +520,17 @@ static int test_eaccess(char *path, int mode)
unsigned int euid = geteuid();
if (stat(path, &st) < 0)
- return (-1);
+ return -1;
if (euid == 0) {
/* Root can read or write any file. */
if (mode != X_OK)
- return (0);
+ return 0;
/* Root can execute any file that has any one of the execute
bits set. */
if (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))
- return (0);
+ return 0;
}
if (st.st_uid == euid) /* owner */
@@ -539,9 +539,9 @@ static int test_eaccess(char *path, int mode)
mode <<= 3;
if (st.st_mode & mode)
- return (0);
+ return 0;
- return (-1);
+ return -1;
}
static void initialize_group_array(void)
@@ -560,7 +560,7 @@ static int is_a_group_member(gid_t gid)
/* Short-circuit if possible, maybe saving a call to getgroups(). */
if (gid == getgid() || gid == getegid())
- return (1);
+ return 1;
if (ngroups == 0)
initialize_group_array();
@@ -568,9 +568,9 @@ static int is_a_group_member(gid_t gid)
/* Search through the list looking for GID. */
for (i = 0; i < ngroups; i++)
if (gid == group_array[i])
- return (1);
+ return 1;
- return (0);
+ return 0;
}
diff --git a/coreutils/tr.c b/coreutils/tr.c
index f2c9065..237ade0 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -249,5 +249,5 @@ int tr_main(int argc, char **argv)
outvec[(GCC4_IS_STUPID)output[i]] = TRUE;
}
convert();
- return (0);
+ return 0;
}
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index 448fe80..2b3b188 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)
if (entries == -1) {
if (test_mode & 2) {
- return(2);
+ return 2;
}
bb_perror_msg_and_die("cannot open '%s'", arg0);
}
diff --git a/e2fsprogs/blkid/dev.c b/e2fsprogs/blkid/dev.c
index b34d4a9..f9f8c63 100644
--- a/e2fsprogs/blkid/dev.c
+++ b/e2fsprogs/blkid/dev.c
@@ -209,6 +209,6 @@ int main(int argc, char **argv)
blkid_put_cache(cache);
- return (0);
+ return 0;
}
#endif
diff --git a/e2fsprogs/blkid/devname.c b/e2fsprogs/blkid/devname.c
index 532aeea..d69000b 100644
--- a/e2fsprogs/blkid/devname.c
+++ b/e2fsprogs/blkid/devname.c
@@ -363,6 +363,6 @@ int main(int argc, char **argv)
printf("%s: error probing devices\n", argv[0]);
blkid_put_cache(cache);
- return (0);
+ return 0;
}
#endif
diff --git a/e2fsprogs/blkid/probe.c b/e2fsprogs/blkid/probe.c
index a2165ef..ea9a619 100644
--- a/e2fsprogs/blkid/probe.c
+++ b/e2fsprogs/blkid/probe.c
@@ -706,7 +706,7 @@ int main(int argc, char **argv)
dev = blkid_get_dev(cache, argv[1], BLKID_DEV_NORMAL);
if (!dev) {
printf("%s: %s has an unsupported type\n", argv[0], argv[1]);
- return (1);
+ return 1;
}
printf("%s is type %s\n", argv[1], dev->bid_type ?
dev->bid_type : "(null)");
@@ -716,6 +716,6 @@ int main(int argc, char **argv)
printf("\tuuid is %s\n", dev->bid_uuid);
blkid_free_dev(dev);
- return (0);
+ return 0;
}
#endif
diff --git a/e2fsprogs/blkid/tag.c b/e2fsprogs/blkid/tag.c
index 3bbd4c1..7cf30b4 100644
--- a/e2fsprogs/blkid/tag.c
+++ b/e2fsprogs/blkid/tag.c
@@ -416,7 +416,7 @@ int main(int argc, char **argv)
printf("Device %s: (%s, %s) %s\n", blkid_dev_devname(dev),
search_type, search_value ? search_value : "NULL",
found ? "FOUND" : "NOT FOUND");
- return(!found);
+ return !found;
}
printf("Device %s...\n", blkid_dev_devname(dev));
@@ -427,6 +427,6 @@ int main(int argc, char **argv)
blkid_tag_iterate_end(iter);
blkid_put_cache(cache);
- return (0);
+ return 0;
}
#endif
diff --git a/e2fsprogs/e2fsck.c b/e2fsprogs/e2fsck.c
index ea5b08c..c482441 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)
if (*control >= ctx->dir_info_count)
return 0;
- return(ctx->dir_info + (*control)++);
+ return ctx->dir_info + (*control)++;
}
/*
@@ -870,7 +870,7 @@ static struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, int *control)
if (*control >= ctx->dx_dir_info_count)
return 0;
- return(ctx->dx_dir_info + (*control)++);
+ return ctx->dx_dir_info + (*control)++;
}
#endif /* ENABLE_HTREE */
@@ -1055,7 +1055,7 @@ static errcode_t ea_refcount_create(int size, ext2_refcount_t *ret)
errout:
ea_refcount_free(refcount);
- return(retval);
+ return retval;
}
/*
@@ -4929,7 +4929,7 @@ static int search_dirent_proc(ext2_ino_t dir, int entry,
p->dir = dir;
sd->count--;
- return(sd->count ? 0 : DIRENT_ABORT);
+ return sd->count ? 0 : DIRENT_ABORT;
}
diff --git a/e2fsprogs/ext2fs/icount.c b/e2fsprogs/ext2fs/icount.c
index 521e00b..7ab5f51 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,
errout:
ext2fs_free_icount(icount);
- return(retval);
+ return retval;
}
errcode_t ext2fs_create_icount(ext2_filsys fs, int flags,
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index 66b78b6..f0c1316 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -549,7 +549,7 @@ static char *find_fsck(char *type)
free(s);
}
free(p);
- return(s);
+ return s;
}
static int progress_active(void)
diff --git a/e2fsprogs/uuid/compare.c b/e2fsprogs/uuid/compare.c
index 2be9e90..348ea7c 100644
--- a/e2fsprogs/uuid/compare.c
+++ b/e2fsprogs/uuid/compare.c
@@ -38,7 +38,7 @@
#include "uuidP.h"
#include <string.h>
-#define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1);
+#define UUCMP(u1,u2) if (u1 != u2) return (u1 < u2) ? -1 : 1;
int uuid_compare(const uuid_t uu1, const uuid_t uu2)
{
diff --git a/editors/patch.c b/editors/patch.c
index 4ddcd00..f11f8a1 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
i++;
}
- return(i);
+ return i;
}
/* If patch_level is -1 it will remove all directory names
@@ -67,13 +67,13 @@ static char *extract_filename(char *line, int patch_level)
filename_start_ptr = temp + 1;
}
- return(xstrdup(filename_start_ptr));
+ return xstrdup(filename_start_ptr);
}
static int file_doesnt_exist(const char *filename)
{
struct stat statbuf;
- return(stat(filename, &statbuf));
+ return stat(filename, &statbuf);
}
int patch_main(int argc, char **argv)
@@ -269,5 +269,5 @@ int patch_main(int argc, char **argv)
* 1 = Some hunks failed
* 2 = More serious problems
*/
- return(ret);
+ return ret;
}
diff --git a/editors/vi.c b/editors/vi.c
index f1c7989..3f9ba46 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -343,7 +343,7 @@ int vi_main(int argc, char **argv)
}
//-----------------------------------------------------------
- return (0);
+ return 0;
}
static void edit_file(Byte * fn)
@@ -530,7 +530,7 @@ static Byte *get_one_address(Byte * p, int *addr) // get colon addr, if present
// unrecognised address- assume -1
*addr = -1;
}
- return (p);
+ return p;
}
static 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
ga0:
while (isblnk(*p))
p++; // skip over trailing spaces
- return (p);
+ return p;
}
#ifdef CONFIG_FEATURE_VI_SETOPTS
@@ -1166,14 +1166,14 @@ static Byte *begin_line(Byte * p) // return pointer to first char cur line
{
while (p > text && p[-1] != '\n')
p--; // go to cur line B-o-l
- return (p);
+ return p;
}
static Byte *end_line(Byte * p) // return pointer to NL of cur line line
{
while (p < end - 1 && *p != '\n')
p++; // go to cur line E-o-l
- return (p);
+ return p;
}
static 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
// Try to stay off of the Newline
if (*p == '\n' && (p - begin_line(p)) > 0)
p--;
- return (p);
+ return p;
}
static 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
if (p[-1] == '\n' && p > text)
p--; // step to prev line
p = begin_line(p); // goto begining of prev line
- return (p);
+ return p;
}
static 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
p = end_line(p);
if (*p == '\n' && p < end - 1)
p++; // step to next line
- return (p);
+ return p;
}
//----- Text Information Routines ------------------------------
@@ -1214,7 +1214,7 @@ static Byte *end_screen(void)
for (cnt = 0; cnt < rows - 2; cnt++)
q = next_line(q);
q = end_line(q);
- return (q);
+ return q;
}
static 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
for (q = text; li > 1; li--) {
q = next_line(q);
}
- return (q);
+ return q;
}
//----- Dot Movement Routines ----------------------------------
@@ -1285,7 +1285,7 @@ static Byte *move_to_col(Byte * p, int l)
co++; // display as ^X, use 2 columns
}
} while (++co <= l && p++ < end);
- return (p);
+ return p;
}
static void dot_next(void)
@@ -1344,7 +1344,7 @@ static Byte *bound_dot(Byte * p) // make sure text[0] <= P < "end"
p = text;
indicate_error('2');
}
- return (p);
+ return p;
}
//----- Helper Utility Routines --------------------------------
@@ -1489,7 +1489,7 @@ static Byte *char_search(Byte * p, Byte * pat, int dir, int range) // search for
} else {
p = p - i;
}
- return (p);
+ return p;
#endif /*REGEX_SEARCH */
}
#endif /* CONFIG_FEATURE_VI_SEARCH */
@@ -1540,7 +1540,7 @@ static Byte *char_insert(Byte * p, Byte c) // insert the char c at 'p'
}
#endif /* CONFIG_FEATURE_VI_SETOPTS */
}
- return (p);
+ return p;
}
static 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
file_modified++; // has the file been modified
p++;
}
- return (p);
+ return p;
}
static 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)
break;
p += dir; // move to next char
}
- return (p);
+ return p;
}
// find matching char of pair () [] {}
@@ -1705,7 +1705,7 @@ static Byte *find_pair(Byte * p, Byte c)
}
if (level != 0)
q = NULL; // indicate no match
- return (q);
+ return q;
}
#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
end = end + size; // adjust the new END
file_modified++; // has the file been modified
thm0:
- return (p);
+ return p;
}
// close a hole in text[]
@@ -1805,7 +1805,7 @@ static Byte *yank_delete(Byte * start, Byte * stop, int dist, int yf)
// we cannot cross NL boundaries
p = start;
if (*p == '\n')
- return (p);
+ return p;
// dont go past a NewLine
for (; p + 1 <= stop; p++) {
if (p[1] == '\n') {
@@ -1821,7 +1821,7 @@ static Byte *yank_delete(Byte * start, Byte * stop, int dist, int yf)
if (yf == YANKDEL) {
p = text_hole_delete(start, stop);
} // delete lines
- return (p);
+ return p;
}
static void show_help(void)
@@ -1932,7 +1932,7 @@ static Byte *string_insert(Byte * p, Byte * s) // insert the string at 'p'
#ifdef CONFIG_FEATURE_VI_YANKMARK
psb("Put %d lines (%d chars) from [%c]", cnt, i, what_reg());
#endif /* CONFIG_FEATURE_VI_YANKMARK */
- return (p);
+ return p;
}
#endif /* CONFIG_FEATURE_VI_YANKMARK || CONFIG_FEATURE_VI_COLON || CONFIG_FEATURE_VI_CRASHME */
@@ -1954,7 +1954,7 @@ static Byte *text_yank(Byte * p, Byte * q, int dest) // copy text into a registe
memset(t, '\0', cnt + 1); // clear new text[]
strncpy((char *) t, (char *) p, cnt); // copy text[] into bufer
reg[dest] = t;
- return (p);
+ return p;
}
static Byte what_reg(void)
@@ -2004,7 +2004,7 @@ static inline Byte *swap_context(Byte * p) // goto new context for '' command ma
context_start = prev_line(prev_line(prev_line(p)));
context_end = next_line(next_line(next_line(p)));
}
- return (p);
+ return p;
}
#endif /* CONFIG_FEATURE_VI_YANKMARK */
@@ -2306,7 +2306,7 @@ static int file_size(const Byte * fn) // what is the byte size of "fn"
int cnt, sr;
if (fn == 0 || strlen((char *)fn) <= 0)
- return (-1);
+ return -1;
cnt = -1;
sr = stat((char *) fn, &st_buf); // see if file exists
if (sr >= 0) {
@@ -2391,7 +2391,7 @@ static int file_write(Byte * fn, Byte * first, Byte * last)
// FIXIT- use the correct umask()
fd = open((char *) fn, (O_WRONLY | O_CREAT | O_TRUNC), 0664);
if (fd < 0)
- return (-1);
+ return -1;
cnt = last - first + 1;
charcnt = write(fd, first, cnt);
if (charcnt == cnt) {
diff --git a/libbb/dump.c b/libbb/dump.c
index 8be29ef..4e4c2e1 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -322,7 +322,7 @@ static int next(char **argv)
if (argv) {
_argv = argv;
- return (1);
+ return 1;
}
for (;;) {
if (*_argv) {
@@ -335,7 +335,7 @@ static int next(char **argv)
statok = done = 1;
} else {
if (done++)
- return (0);
+ return 0;
statok = 0;
}
if (bb_dump_skip)
@@ -343,7 +343,7 @@ static int next(char **argv)
if (*_argv)
++_argv;
if (!bb_dump_skip)
- return (1);
+ return 1;
}
/* NOTREACHED */
}
diff --git a/libbb/obscure.c b/libbb/obscure.c
index 9ac6bcd..56aacc9 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
/* size */
if (!new_p || (length = strlen(new_p)) < CONFIG_PASSWORD_MINLEN)
- return("too short");
+ return "too short";
/* no username as-is, as sub-string, reversed, capitalized, doubled */
if (string_checker(new_p, pw->pw_name)) {
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index de046e8..968270f 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -1254,7 +1254,7 @@ static int get_uid_gid (int flag, const char *string)
if(ENABLE_DEVFSD_VERBOSE)
msg_logger(LOG_ERR,"unknown %s: %s, defaulting to %cid=0", msg, string, msg[0]);
- return (0);
+ return 0;
}/* End Function get_uid_gid */
static mode_t get_mode (const char *string)
@@ -1321,7 +1321,7 @@ static const char *get_variable (const char *variable, void *info)
if( i >= 0 && i <= 3)
{
debug_msg_logger(LOG_INFO, "%s: i=%d %s", __FUNCTION__, i ,field_names[i+7]);
- return(field_names[i+7]);
+ return field_names[i+7];
}
if(i == 4 )
@@ -1417,17 +1417,15 @@ static int mksymlink (const char *oldpath, const char *newpath)
debug_msg_logger(LOG_INFO, __FUNCTION__);
if ( !make_dir_tree (newpath) )
- return (-1);
+ return -1;
- if (symlink (oldpath, newpath) != 0)
- {
- if (errno != EEXIST)
- {
+ if (symlink (oldpath, newpath) != 0) {
+ if (errno != EEXIST) {
debug_msg_logger(LOG_ERR, "%s: %s to %s: %m", __FUNCTION__, oldpath, newpath);
- return (-1);
+ return -1;
}
}
- return (0);
+ return 0;
} /* End Function mksymlink */
@@ -1444,7 +1442,7 @@ static int make_dir_tree (const char *path)
debug_msg_logger(LOG_ERR, "%s: %s: %m",__FUNCTION__, path);
return (FALSE);
}
- return(TRUE);
+ return TRUE;
} /* End Function make_dir_tree */
static int expand_expression(char *output, unsigned int outsize,
diff --git a/modutils/insmod.c b/modutils/insmod.c
index f6ab443..dd999a6 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)
*license = value+1;
for (i = 0; i < sizeof(gpl_licenses)/sizeof(gpl_licenses[0]); ++i) {
if (strcmp(value+1, gpl_licenses[i]) == 0)
- return(0);
+ return 0;
}
- return(2);
+ return 2;
}
if (strchr(ptr, '\0'))
ptr = strchr(ptr, '\0') + 1;
@@ -3642,7 +3642,7 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
ptr = endptr;
}
}
- return(1);
+ return 1;
}
#define TAINT_FILENAME "/proc/sys/kernel/tainted"
@@ -4227,12 +4227,11 @@ out:
if(fp)
fclose(fp);
free(tmp1);
- if(!tmp1) {
+ if(!tmp1)
free(m_name);
- }
free(m_filename);
#endif
- return(exit_status);
+ return exit_status;
}
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index f462aaf..ffde3d8 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -134,7 +134,7 @@ int lsmod_main(int argc, char **argv)
free(module_names);
#endif
- return( 0);
+ return 0;
}
#else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index ce239a2..22e864d 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -57,8 +57,8 @@ int rmmod_main(int argc, char **argv)
while (nmod != pnmod) {
if (syscall(__NR_delete_module, NULL, flags) != 0) {
- if (errno==EFAULT)
- return(ret);
+ if (errno == EFAULT)
+ return ret;
bb_perror_msg_and_die("rmmod");
}
pnmod = nmod;
@@ -92,5 +92,5 @@ int rmmod_main(int argc, char **argv)
}
}
- return(ret);
+ return ret;
}
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 3773f99..1facfa3 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -100,7 +100,7 @@ static FILE *ftp_login(ftp_host_info_t *server)
ftpcmd("TYPE I", NULL, control_stream, buf);
- return(control_stream);
+ return control_stream;
}
#if !ENABLE_FTPGET
@@ -187,7 +187,7 @@ int ftp_receive(ftp_host_info_t *server, FILE *control_stream,
}
ftpcmd("QUIT", NULL, control_stream, buf);
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
#endif
@@ -252,7 +252,7 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream,
}
ftpcmd("QUIT", NULL, control_stream, buf);
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
#endif
@@ -338,5 +338,5 @@ int ftpgetput_main(int argc, char **argv)
/* Connect/Setup/Configure the FTP session */
control_stream = ftp_login(server);
- return(ftp_action(server, control_stream, argv[optind + 1], argv[optind + 2]));
+ return ftp_action(server, control_stream, argv[optind + 1], argv[optind + 2]);
}
diff --git a/shell/ash.c b/shell/ash.c
index 4fef0f2..704d03b 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2129,10 +2129,10 @@ unalias(const char *name)
INTOFF;
*app = freealias(*app);
INTON;
- return (0);
+ return 0;
}
- return (1);
+ return 1;
}
static void
@@ -2181,7 +2181,7 @@ aliascmd(int argc, char **argv)
for (ap = atab[i]; ap; ap = ap->next) {
printalias(ap);
}
- return (0);
+ return 0;
}
while ((n = *++argv) != NULL) {
if ((v = strchr(n+1, '=')) == NULL) { /* n+1: funny ksh stuff */
@@ -2207,7 +2207,7 @@ unaliascmd(int argc, char **argv)
while ((i = nextopt("a")) != '\0') {
if (i == 'a') {
rmaliases();
- return (0);
+ return 0;
}
}
for (i = 0; *argptr; argptr++) {
@@ -13420,7 +13420,8 @@ static int arith_apply(operator op, v_n_t *numstack, v_n_t **numstackptr)
/* protect geting var value, is number now */
numptr_m1->var = NULL;
return 0;
-err: return(-1);
+ err:
+ return -1;
}
/* longest must first */
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index dda6f69..ceaa2e8 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -1180,7 +1180,8 @@ static int get_next_history(void)
if (ch < n_history) {
get_previous_history(); /* save the current history line */
- return (cur_history = ch+1);
+ cur_history = ch + 1;
+ return cur_history;
} else {
beep();
return 0;
diff --git a/shell/hush.c b/shell/hush.c
index 2013a9d..57b4a7a 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1225,7 +1225,7 @@ static int checkjobs(struct pipe* fg_pipe)
if (i==fg_pipe->num_progs-1)
rcode=WEXITSTATUS(status);
(fg_pipe->num_progs)--;
- return(rcode);
+ return rcode;
}
}
}
@@ -2768,7 +2768,7 @@ int hush_main(int argc, char **argv)
#endif
final_return:
- return(opt?opt:last_return_code);
+ return opt ? opt : last_return_code;
}
static char *insert_var_value(char *inp)
diff --git a/shell/msh.c b/shell/msh.c
index c0f013e..8f58e94 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -1007,13 +1007,13 @@ static int newfile(char *s)
if (f < 0) {
prs(s);
err(": cannot open");
- return (1);
+ return 1;
}
} else
f = 0;
next(remap(f));
- return (0);
+ return 0;
}
@@ -1162,7 +1162,7 @@ static int newenv(int f)
if (f) {
quitenv();
- return (1);
+ return 1;
}
ep = (struct env *) space(sizeof(*ep));
@@ -1175,7 +1175,7 @@ static int newenv(int f)
e.oenv = ep;
e.errpt = errpt;
- return (0);
+ return 0;
}
static void quitenv(void)
@@ -1202,8 +1202,8 @@ static int anys(char *s1, char *s2)
{
while (*s1)
if (any(*s1++, s2))
- return (1);
- return (0);
+ return 1;
+ return 0;
}
/*
@@ -1213,8 +1213,8 @@ static int any(int c, char *s)
{
while (*s)
if (*s++ == c)
- return (1);
- return (0);
+ return 1;
+ return 0;
}
static char *putn(int n)
@@ -1396,12 +1396,12 @@ static int isassign(char *s)
DBGPRINTF7(("ISASSIGN: enter, s=%s\n", s));
if (!isalpha((int) *s) && *s != '_')
- return (0);
+ return 0;
for (; *s != '='; s++)
if (*s == 0 || (!isalnum(*s) && *s != '_'))
- return (0);
+ return 0;
- return (1);
+ return 1;
}
static int assign(char *s, int cf)
@@ -1412,15 +1412,15 @@ static int assign(char *s, int cf)
DBGPRINTF7(("ASSIGN: enter, s=%s, cf=%d\n", s, cf));
if (!isalpha(*s) && *s != '_')
- return (0);
+ return 0;
for (cp = s; *cp != '='; cp++)
if (*cp == 0 || (!isalnum(*cp) && *cp != '_'))
- return (0);
+ return 0;
vp = lookup(s);
nameval(vp, ++cp, cf == COPYV ? (char *) NULL : s);
if (cf != COPYV)
vp->status &= ~GETCELL;
- return (1);
+ return 1;
}
static int checkname(char *cp)
@@ -1428,11 +1428,11 @@ static int checkname(char *cp)
DBGPRINTF7(("CHECKNAME: enter, cp=%s\n", cp));
if (!isalpha(*cp++) && *(cp - 1) != '_')
- return (0);
+ return 0;
while (*cp)
if (!isalnum(*cp++) && *(cp - 1) != '_')
- return (0);
- return (1);
+ return 0;
+ return 1;
}
static void putvlist(int f, int out)
@@ -1454,7 +1454,7 @@ static int eqname(char *n1, char *n2)
{
for (; *n1 != '=' && *n1 != 0; n1++)
if (*n2++ != *n1)
- return (0);
+ return 0;
return (*n2 == 0 || *n2 == '=');
}
@@ -1483,31 +1483,31 @@ static int gmatch(char *s, char *p)
int sc, pc;
if (s == NULL || p == NULL)
- return (0);
+ return 0;
while ((pc = *p++ & CMASK) != '\0') {
sc = *s++ & QMASK;
switch (pc) {
case '[':
if ((p = cclass(p, sc)) == NULL)
- return (0);
+ return 0;
break;
case '?':
if (sc == 0)
- return (0);
+ return 0;
break;
case '*':
s--;
do {
if (*p == '\0' || gmatch(s, p))
- return (1);
+ return 1;
} while (*s++ != '\0');
- return (0);
+ return 0;
default:
if (sc != (pc & ~QUOTE))
- return (0);
+ return 0;
}
}
return (*s == 0);
@@ -1805,7 +1805,7 @@ static int synio(int cf)
if ((c = yylex(cf)) != '<' && c != '>') {
peeksym = c;
- return (0);
+ return 0;
}
i = yylval.i;
@@ -1817,7 +1817,7 @@ static int synio(int cf)
markhere(yylval.cp, iop);
DBGPRINTF7(("SYNIO: returning 1\n"));
- return (1);
+ return 1;
}
static void musthave(int c, int cf)
@@ -2166,7 +2166,7 @@ static int rlookup(char *n)
}
DBGPRINTF7(("RLOOKUP: NO match, returning 0\n"));
- return (0); /* Not a shell multiline */
+ return 0; /* Not a shell multiline */
}
static struct op *newtp(void)
@@ -2428,7 +2428,7 @@ static int collect(int c, int c1)
DBGPRINTF8(("COLLECT: return 0, line is %s\n", line));
- return (0);
+ return 0;
}
/* "multiline commands" helper func */
@@ -2510,7 +2510,7 @@ static int execute(struct op *t, int *pin, int *pout, int act)
if (t == NULL) {
DBGPRINTF4(("EXECUTE: enter, t==null, returning.\n"));
- return (0);
+ return 0;
}
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)
if (newpid == -1) {
DBGPRINTF(("FORKEXEC: ERROR, cannot vfork()!\n"));
- return (-1);
+ return -1;
}
@@ -2804,7 +2804,7 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
/* moved up
if (i == -1)
- return(rv);
+ return rv;
*/
if (pin != NULL)
@@ -2839,7 +2839,7 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
err("piping to/from shell builtins not yet done");
if (forked)
_exit(-1);
- return (-1);
+ return -1;
}
#endif
@@ -2858,7 +2858,7 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
err(": cannot redirect shell command");
if (forked)
_exit(-1);
- return (-1);
+ return -1;
}
while (*iopp)
if (iosetup(*iopp++, pin != NULL, pout != NULL)) {
@@ -2919,23 +2919,23 @@ static int iosetup(struct ioword *iop, int pipein, int pipeout)
iop->io_unit = iop->io_flag & (IOREAD | IOHERE) ? 0 : 1;
if (pipein && iop->io_unit == 0)
- return (0);
+ return 0;
if (pipeout && iop->io_unit == 1)
- return (0);
+ return 0;
msg = iop->io_flag & (IOREAD | IOHERE) ? "open" : "create";
if ((iop->io_flag & IOHERE) == 0) {
cp = iop->io_name;
if ((cp = evalstr(cp, DOSUB | DOTRIM)) == NULL)
- return (1);
+ return 1;
}
if (iop->io_flag & IODUP) {
if (cp[1] || (!isdigit(*cp) && *cp != '-')) {
prs(cp);
err(": illegal >& argument");
- return (1);
+ return 1;
}
if (*cp == '-')
iop->io_flag = IOCLOSE;
@@ -2967,20 +2967,20 @@ static int iosetup(struct ioword *iop, int pipein, int pipeout)
case IOCLOSE:
close(iop->io_unit);
- return (0);
+ return 0;
}
if (u < 0) {
prs(cp);
prs(": cannot ");
warn(msg);
- return (1);
+ return 1;
} else {
if (u != iop->io_unit) {
dup2(u, iop->io_unit);
close(u);
}
}
- return (0);
+ return 0;
}
static void echo(char **wp)
@@ -3281,7 +3281,7 @@ static int dohelp(struct op *t)
static int dolabel(struct op *t)
{
- return (0);
+ return 0;
}
static int dochdir(struct op *t)
@@ -3293,10 +3293,10 @@ static int dochdir(struct op *t)
else if (chdir(cp) < 0)
er = ": bad directory";
else
- return (0);
+ return 0;
prs(cp != NULL ? cp : "cd");
err(er);
- return (1);
+ return 1;
}
static int doshift(struct op *t)
@@ -3306,13 +3306,13 @@ static int doshift(struct op *t)
n = t->words[1] ? getn(t->words[1]) : 1;
if (dolc < n) {
err("nothing to shift");
- return (1);
+ return 1;
}
dolv[n] = dolv[0];
dolv += n;
dolc -= n;
setval(lookup("#"), putn(dolc));
- return (0);
+ return 0;
}
/*
@@ -3330,7 +3330,7 @@ static int dologin(struct op *t)
prs(t->words[0]);
prs(": ");
err(cp);
- return (1);
+ return 1;
}
static int doumask(struct op *t)
@@ -3349,7 +3349,7 @@ static int doumask(struct op *t)
n = n * 8 + (*cp - '0');
umask(n);
}
- return (0);
+ return 0;
}
static int doexec(struct op *t)
@@ -3361,14 +3361,14 @@ static int doexec(struct op *t)
t->ioact = NULL;
for (i = 0; (t->words[i] = t->words[i + 1]) != NULL; i++);
if (i == 0)
- return (1);
+ return 1;
execflg = 1;
ofail = failpt;
if (setjmp(failpt = ex) == 0)
execute(t, NOPIPE, NOPIPE, FEXEC);
failpt = ofail;
execflg = 0;
- return (1);
+ return 1;
}
static int dodot(struct op *t)
@@ -3382,7 +3382,7 @@ static int dodot(struct op *t)
if ((cp = t->words[1]) == NULL) {
DBGPRINTF(("DODOT: bad args, ret 0\n"));
- return (0);
+ return 0;
} else {
DBGPRINTF(("DODOT: cp is %s\n", cp));
}
@@ -3420,7 +3420,7 @@ static int dodot(struct op *t)
prs(cp);
err(": not found");
- return (-1);
+ return -1;
}
static int dowait(struct op *t)
@@ -3431,11 +3431,11 @@ static int dowait(struct op *t)
if ((cp = t->words[1]) != NULL) {
i = getn(cp);
if (i == 0)
- return (0);
+ return 0;
} else
i = -1;
setstatus(waitfor(i, 1));
- return (0);
+ return 0;
}
static int doread(struct op *t)
@@ -3446,7 +3446,7 @@ static int doread(struct op *t)
if (t->words[1] == NULL) {
err("Usage: read name ...");
- return (1);
+ return 1;
}
for (wp = t->words + 1; *wp; wp++) {
for (cp = e.linep; !nl && cp < elinep - 1; cp++)
@@ -3479,7 +3479,7 @@ static int dotrap(struct op *t)
prs(trap[i]);
prs("\n");
}
- return (0);
+ return 0;
}
resetsig = isdigit(*t->words[1]);
for (i = resetsig ? 1 : 2; t->words[i] != NULL; ++i) {
@@ -3502,7 +3502,7 @@ static int dotrap(struct op *t)
setsig(n, SIG_DFL);
}
}
- return (0);
+ return 0;
}
static int getsig(char *s)
@@ -3571,7 +3571,7 @@ static int brkcontin(char *cp, int val)
} while (--nl);
if (nl) {
err("bad break/continue level");
- return (1);
+ return 1;
}
isbreak = val;
longjmp(bc->brkpt, 1);
@@ -3590,19 +3590,19 @@ static int doexit(struct op *t)
leave();
/* NOTREACHED */
- return (0);
+ return 0;
}
static int doexport(struct op *t)
{
rdexp(t->words + 1, export, EXPORT);
- return (0);
+ return 0;
}
static int doreadonly(struct op *t)
{
rdexp(t->words + 1, ronly, RONLY);
- return (0);
+ return 0;
}
static void rdexp(char **wp, void (*f) (struct var *), int key)
@@ -3643,7 +3643,7 @@ static int doset(struct op *t)
if ((cp = t->words[1]) == NULL) {
for (vp = vlist; vp; vp = vp->next)
varput(vp->name, 1);
- return (0);
+ return 0;
}
if (*cp == '-') {
/* bad: t->words++; */
@@ -3674,7 +3674,7 @@ static int doset(struct op *t)
setval(lookup("#"), putn(dolc));
setarea((char *) (dolv - 1), 0);
}
- return (0);
+ return 0;
}
static void varput(char *s, int out)
@@ -3818,7 +3818,7 @@ static int expand(char *cp, struct wdblock **wbp, int f)
gflg = 0;
if (cp == NULL)
- return (0);
+ return 0;
if (!anys("$`'\"", cp) &&
!anys(ifs->value, cp) && ((f & DOGLOB) == 0 || !anys("[*?", cp))) {
@@ -3826,7 +3826,7 @@ static int expand(char *cp, struct wdblock **wbp, int f)
if (f & DOTRIM)
unquote(cp);
*wbp = addword(cp, *wbp);
- return (1);
+ return 1;
}
if (newenv(setjmp(errpt = ev)) == 0) {
PUSHIO(aword, cp, strchar);
@@ -3866,7 +3866,7 @@ static char *blank(int f)
switch (c = subgetc('"', foundequals)) {
case 0:
if (sp == e.linep)
- return (0);
+ return 0;
*e.linep++ = 0;
return (sp);
@@ -3930,7 +3930,7 @@ static int subgetc(char ec, int quoted)
if (!INSUB() && ec != '\'') {
if (c == '`') {
if (grave(quoted) == 0)
- return (0);
+ return 0;
e.iop->task = XGRAVE;
goto again;
}
@@ -4001,7 +4001,7 @@ static int dollar(int quoted)
/* should check dollar */
e.linep = s;
PUSHIO(awordlist, dolv + 1, dolchar);
- return (0);
+ return 0;
} else { /* trap the nasty ${=} */
s[0] = '1';
s[1] = 0;
@@ -4042,7 +4042,7 @@ static int dollar(int quoted)
}
e.linep = s;
PUSHIO(aword, dolp, quoted ? qstrchar : strchar);
- return (0);
+ return 0;
}
/*
@@ -4072,7 +4072,7 @@ static int grave(int quoted)
for (cp = e.iop->argp->aword; *cp != '`'; cp++)
if (*cp == 0) {
err("no closing `");
- return (0);
+ return 0;
}
/* string copy with dollar expansion */
@@ -4119,7 +4119,7 @@ static int grave(int quoted)
break;
default:
err("unclosed ${\n");
- return (0);
+ return 0;
}
if (operator) {
src++;
@@ -4129,7 +4129,7 @@ static int grave(int quoted)
alt_value[alt_index] = 0;
if (*src != '}') {
err("unclosed ${\n");
- return (0);
+ return 0;
}
}
src++;
@@ -4164,7 +4164,7 @@ static int grave(int quoted)
alt_value : vp->value;
else if (operator == '?') {
err(alt_value);
- return (0);
+ return 0;
} else if (alt_index && (operator != '+')) {
value = alt_value;
if (operator == '=')
@@ -4186,7 +4186,7 @@ static int grave(int quoted)
*dest = '\0';
if (openpipe(pf) < 0)
- return (0);
+ return 0;
while ((i = vfork()) == -1 && errno == EAGAIN);
@@ -4195,7 +4195,7 @@ static int grave(int quoted)
if (i < 0) {
closepipe(pf);
err((char *) bb_msg_memory_exhausted);
- return (0);
+ return 0;
}
if (i != 0) {
waitpid(i, NULL, 0);
@@ -4204,7 +4204,7 @@ static int grave(int quoted)
PUSHIO(afile, remap(pf[0]),
(int (*)(struct ioarg *)) ((quoted) ? qgravechar :
gravechar));
- return (1);
+ return 1;
}
/* allow trapped signals */
/* XXX - Maybe this signal stuff should go as well? */
@@ -4379,8 +4379,8 @@ static int anyspcl(struct wdblock *wb)
wd = wb->w_words;
for (i = 0; i < wb->w_nword; i++)
if (anys(spcl, *wd++))
- return (1);
- return (0);
+ return 1;
+ return 0;
}
static int xstrcmp(char *p1, char *p2)
@@ -4634,14 +4634,14 @@ static int readc(void)
if (e.iop >= iostack) {
RCPRINTF(("READC: return 0, e.iop %p\n", e.iop));
- return (0);
+ return 0;
}
DBGPRINTF(("READC: leave()...\n"));
leave();
/* NOTREACHED */
- return (0);
+ return 0;
}
static void ioecho(char c)
@@ -4737,7 +4737,7 @@ static int nlchar(struct ioarg *ap)
int c;
if (ap->aword == NULL)
- return (0);
+ return 0;
if ((c = *ap->aword++) == 0) {
ap->aword = NULL;
return ('\n');
@@ -4755,7 +4755,7 @@ static int wdchar(struct ioarg *ap)
char **wl;
if ((wl = ap->awordlist) == NULL)
- return (0);
+ return 0;
if (*wl != NULL) {
if ((c = *(*wl)++) != 0)
return (c & 0177);
@@ -4776,9 +4776,9 @@ static int dolchar(struct ioarg *ap)
if ((wp = *ap->awordlist++) != NULL) {
PUSHIO(aword, wp, *ap->awordlist == NULL ? strchar : xxchar);
- return (-1);
+ return -1;
}
- return (0);
+ return 0;
}
static int xxchar(struct ioarg *ap)
@@ -4786,7 +4786,7 @@ static int xxchar(struct ioarg *ap)
int c;
if (ap->aword == NULL)
- return (0);
+ return 0;
if ((c = *ap->aword++) == '\0') {
ap->aword = NULL;
return (' ');
@@ -4802,7 +4802,7 @@ static int strchar(struct ioarg *ap)
int c;
if (ap->aword == NULL || (c = *ap->aword++) == 0)
- return (0);
+ return 0;
return (c);
}
@@ -4814,7 +4814,7 @@ static int qstrchar(struct ioarg *ap)
int c;
if (ap->aword == NULL || (c = *ap->aword++) == 0)
- return (0);
+ return 0;
return (c | QUOTE);
}
@@ -5143,13 +5143,13 @@ static int herein(char *hname, int xdoll)
(void) &tf;
#endif
if (hname == NULL)
- return (-1);
+ return -1;
DBGPRINTF7(("HEREIN: hname is %s, xdoll=%d\n", hname, xdoll));
hf = open(hname, 0);
if (hf < 0)
- return (-1);
+ return -1;
if (xdoll) {
char c;
@@ -5158,7 +5158,7 @@ static int herein(char *hname, int xdoll)
tf = mkstemp(tname);
if (tf < 0)
- return (-1);
+ return -1;
if (newenv(setjmp(errpt = ev)) == 0) {
PUSHIO(afile, hf, herechar);
setbase(e.iop);
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 645b0b9..1210595 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -55,7 +55,7 @@ static time_t askremotedate(const char *host)
* Subtract the RFC 868 time to get Linux epoch
*/
- return(ntohl(nett) - RFC_868_BIAS);
+ return ntohl(nett) - RFC_868_BIAS;
}
int rdate_main(int argc, char **argv)