diff options
-rw-r--r-- | src/df.c | 2 | ||||
-rw-r--r-- | src/dircolors.c | 6 | ||||
-rw-r--r-- | src/du.c | 2 | ||||
-rw-r--r-- | src/ls.c | 2 | ||||
-rw-r--r-- | src/remove.c | 2 | ||||
-rw-r--r-- | src/touch.c | 2 |
6 files changed, 8 insertions, 8 deletions
@@ -583,7 +583,7 @@ main (int argc, char **argv) human_readable_base = 1024; output_units = 1; } - else if (bs && strcmp (bs, "SI") == 0) + else if (bs && STREQ (bs, "SI")) { human_readable_base = 1000; output_units = 1; diff --git a/src/dircolors.c b/src/dircolors.c index 336c0580c..6f0a3c8f8 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -1,5 +1,5 @@ /* dircolors - output commands to set the LS_COLOR environment variable - Copyright (C) 1994, 1995, 1997 H. Peter Anvin + Copyright (C) 1994, 1995, 1997, 1998 H. Peter Anvin Copyright (C) 96, 97, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -295,7 +295,7 @@ dc_parse_stream (FILE *fp, const char *filename) unrecognized = 0; if (strcasecmp (keywd, "TERM") == 0) { - if (strcmp (arg, term) == 0) + if (STREQ (arg, term)) state = ST_TERMSURE; else if (state != ST_TERMSURE) state = ST_TERMNO; @@ -376,7 +376,7 @@ dc_parse_file (const char *filename) FILE *fp; int err; - if (strcmp (filename, "-") == 0) + if (STREQ (filename, "-")) { have_read_stdin = 1; fp = stdin; @@ -274,7 +274,7 @@ main (int argc, char **argv) human_readable_base = 1024; output_units = 1; } - else if (bs && strcmp (bs, "SI") == 0) + else if (bs && STREQ (bs, "SI")) { human_readable_base = 1000; output_units = 1; @@ -860,7 +860,7 @@ decode_switches (int argc, char **argv) if ((p = getenv ("BLOCKSIZE")) && strncmp (p, "HUMAN", sizeof ("HUMAN") - 1) == 0) human_readable_base = 1024; - else if (p && strcmp (p, "SI") == 0) + else if (p && STREQ (p, "SI")) human_readable_base = 1000; line_length = 80; diff --git a/src/remove.c b/src/remove.c index 6d9f57538..1bb3b5d8a 100644 --- a/src/remove.c +++ b/src/remove.c @@ -206,7 +206,7 @@ hash_pjw (const void *x, unsigned int tablesize) static bool hash_compare_strings (void const *x, void const *y) { - return strcmp (x, y) == 0; + return STREQ (x, y); } static inline void diff --git a/src/touch.c b/src/touch.c index 7f90b5f52..8bb24b8d5 100644 --- a/src/touch.c +++ b/src/touch.c @@ -366,7 +366,7 @@ main (int argc, char **argv) date_set++; } - if (!date_set && optind < argc && strcmp (argv[optind - 1], "--")) + if (!date_set && optind < argc && !STREQ (argv[optind - 1], "--")) { newtime = posixtime (argv[optind]); if (newtime != (time_t) -1) |