summaryrefslogtreecommitdiff
path: root/coreutils/diff.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-27 16:49:31 +0000
committerDenis Vlasenko2006-11-27 16:49:31 +0000
commit079f8afa0a16112cbaf7012c82b38b7358b82141 (patch)
tree0d8cba8e45b1a8b975e0b8c7a8377703ab5547a6 /coreutils/diff.c
parent10d0d4eec7e3a292917f43f72afae20341d9ba11 (diff)
downloadbusybox-079f8afa0a16112cbaf7012c82b38b7358b82141.zip
busybox-079f8afa0a16112cbaf7012c82b38b7358b82141.tar.gz
style cleanup: return(a) -> return a, part 1
Diffstat (limited to 'coreutils/diff.c')
-rw-r--r--coreutils/diff.c30
1 files changed, 15 insertions, 15 deletions
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 */