aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-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
5 files changed, 27 insertions, 27 deletions
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)
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 54adc2b6e..3e003905e 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 8a7f18265..59f0b504a 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 c1097c28c..ebb4f9086 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 f2c9065d1..237ade047 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;
}