aboutsummaryrefslogtreecommitdiff
path: root/coreutils/md5_sha1_sum.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-16 23:49:13 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-16 23:49:13 +0000
commit9f739445cd3deddd0343c3a8d5a981ede26bef30 (patch)
tree6dc013e44d2281eb1e6f61c4bca1ae7546001f79 /coreutils/md5_sha1_sum.c
parenta597aaddfa76d589d3e1a37b1f1c3401c2decffd (diff)
downloadbusybox-w32-9f739445cd3deddd0343c3a8d5a981ede26bef30.tar.gz
busybox-w32-9f739445cd3deddd0343c3a8d5a981ede26bef30.tar.bz2
busybox-w32-9f739445cd3deddd0343c3a8d5a981ede26bef30.zip
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
Diffstat (limited to 'coreutils/md5_sha1_sum.c')
-rw-r--r--coreutils/md5_sha1_sum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index e8d3a1509..6fe1b0286 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -39,7 +39,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
39 void (*final)(void*, void*); 39 void (*final)(void*, void*);
40 40
41 src_fd = STDIN_FILENO; 41 src_fd = STDIN_FILENO;
42 if (filename[0] != '-' || filename[1]) { /* not "-" */ 42 if (NOT_LONE_DASH(filename)) {
43 src_fd = open(filename, O_RDONLY); 43 src_fd = open(filename, O_RDONLY);
44 if (src_fd < 0) { 44 if (src_fd < 0) {
45 bb_perror_msg("%s", filename); 45 bb_perror_msg("%s", filename);
@@ -120,7 +120,7 @@ int md5_sha1_sum_main(int argc, char **argv)
120 } 120 }
121 121
122 pre_computed_stream = stdin; 122 pre_computed_stream = stdin;
123 if (file_ptr[0] != '-' || file_ptr[1]) { /* not "-" */ 123 if (NOT_LONE_DASH(file_ptr)) {
124 pre_computed_stream = xfopen(file_ptr, "r"); 124 pre_computed_stream = xfopen(file_ptr, "r");
125 } 125 }
126 126