From 9f739445cd3deddd0343c3a8d5a981ede26bef30 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 16 Dec 2006 23:49:13 +0000 Subject: inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid] --- coreutils/md5_sha1_sum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coreutils/md5_sha1_sum.c') 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) void (*final)(void*, void*); src_fd = STDIN_FILENO; - if (filename[0] != '-' || filename[1]) { /* not "-" */ + if (NOT_LONE_DASH(filename)) { src_fd = open(filename, O_RDONLY); if (src_fd < 0) { bb_perror_msg("%s", filename); @@ -120,7 +120,7 @@ int md5_sha1_sum_main(int argc, char **argv) } pre_computed_stream = stdin; - if (file_ptr[0] != '-' || file_ptr[1]) { /* not "-" */ + if (NOT_LONE_DASH(file_ptr)) { pre_computed_stream = xfopen(file_ptr, "r"); } -- cgit v1.2.3