diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-29 12:10:23 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-29 12:10:23 +0000 |
commit | d2c306e862abf49dd4b1ff1d1bd1a789317b7905 (patch) | |
tree | ea8e439001256f7f6da7683399115d009552d777 /coreutils/diff.c | |
parent | 1ec5b2905484b7904aabb01f56c70265fb538c82 (diff) | |
download | busybox-w32-d2c306e862abf49dd4b1ff1d1bd1a789317b7905.tar.gz busybox-w32-d2c306e862abf49dd4b1ff1d1bd1a789317b7905.tar.bz2 busybox-w32-d2c306e862abf49dd4b1ff1d1bd1a789317b7905.zip |
- ls: remove unused variable
- dpkg.c, diff: use xstat
text data bss dec hex filename
848823 9100 645216 1503139 16efa3 busybox_old
848679 9100 645216 1502995 16ef13 busybox_unstripped
bloatcheck is completely useless as it sees -79 for this, which is bogus.
Diffstat (limited to 'coreutils/diff.c')
-rw-r--r-- | coreutils/diff.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c index c9274e64f..a1a74d51e 100644 --- a/coreutils/diff.c +++ b/coreutils/diff.c | |||
@@ -1237,13 +1237,13 @@ int diff_main(int argc, char **argv) { | |||
1237 | if (strcmp(argv[0], "-") == 0) { | 1237 | if (strcmp(argv[0], "-") == 0) { |
1238 | fstat(STDIN_FILENO, &stb1); | 1238 | fstat(STDIN_FILENO, &stb1); |
1239 | gotstdin = 1; | 1239 | gotstdin = 1; |
1240 | } else if (stat(argv[0], &stb1) != 0) | 1240 | } else |
1241 | bb_perror_msg_and_die("Couldn't stat %s", argv[0]); | 1241 | xstat(argv[0], &stb1); |
1242 | if (strcmp(argv[1], "-") == 0) { | 1242 | if (strcmp(argv[1], "-") == 0) { |
1243 | fstat(STDIN_FILENO, &stb2); | 1243 | fstat(STDIN_FILENO, &stb2); |
1244 | gotstdin = 1; | 1244 | gotstdin = 1; |
1245 | } else if (stat(argv[1], &stb2) != 0) | 1245 | } else |
1246 | bb_perror_msg_and_die("Couldn't stat %s", argv[1]); | 1246 | xstat(argv[1], &stb2); |
1247 | if (gotstdin && (S_ISDIR(stb1.st_mode) || S_ISDIR(stb2.st_mode))) | 1247 | if (gotstdin && (S_ISDIR(stb1.st_mode) || S_ISDIR(stb2.st_mode))) |
1248 | bb_error_msg_and_die("Can't compare - to a directory"); | 1248 | bb_error_msg_and_die("Can't compare - to a directory"); |
1249 | if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) { | 1249 | if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) { |
@@ -1256,13 +1256,11 @@ int diff_main(int argc, char **argv) { | |||
1256 | else { | 1256 | else { |
1257 | if (S_ISDIR(stb1.st_mode)) { | 1257 | if (S_ISDIR(stb1.st_mode)) { |
1258 | argv[0] = concat_path_file(argv[0], argv[1]); | 1258 | argv[0] = concat_path_file(argv[0], argv[1]); |
1259 | if (stat(argv[0], &stb1) < 0) | 1259 | xstat(argv[0], &stb1); |
1260 | bb_perror_msg_and_die("Couldn't stat %s", argv[0]); | ||
1261 | } | 1260 | } |
1262 | if (S_ISDIR(stb2.st_mode)) { | 1261 | if (S_ISDIR(stb2.st_mode)) { |
1263 | argv[1] = concat_path_file(argv[1], argv[0]); | 1262 | argv[1] = concat_path_file(argv[1], argv[0]); |
1264 | if (stat(argv[1], &stb2) < 0) | 1263 | xstat(argv[1], &stb2); |
1265 | bb_perror_msg_and_die("Couldn't stat %s", argv[1]); | ||
1266 | } | 1264 | } |
1267 | print_status(diffreg(argv[0], argv[1], 0), argv[0], argv[1], NULL); | 1265 | print_status(diffreg(argv[0], argv[1], 0), argv[0], argv[1], NULL); |
1268 | } | 1266 | } |