aboutsummaryrefslogtreecommitdiff
path: root/coreutils/diff.c
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-29 12:10:23 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-29 12:10:23 +0000
commite78189465fdad9f28d985477ac05f2c5a3afb280 (patch)
treeea8e439001256f7f6da7683399115d009552d777 /coreutils/diff.c
parentd4cc0d7783259457083cdd8ded37e20ad232fbd9 (diff)
downloadbusybox-w32-e78189465fdad9f28d985477ac05f2c5a3afb280.tar.gz
busybox-w32-e78189465fdad9f28d985477ac05f2c5a3afb280.tar.bz2
busybox-w32-e78189465fdad9f28d985477ac05f2c5a3afb280.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. git-svn-id: svn://busybox.net/trunk/busybox@15218 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/diff.c')
-rw-r--r--coreutils/diff.c14
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 }