From d4257e63c7956d7a77349f0e3b693afa5e1ab9df Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 12 Apr 1998 09:27:45 +0000 Subject: Use STREQ rather than strcmp --- src/uniq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/uniq.c') diff --git a/src/uniq.c b/src/uniq.c index 176c86571..27395afd3 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -216,14 +216,14 @@ check_file (const char *infile, const char *outfile) int prevlen, thislen; int match_count = 0; - if (!strcmp (infile, "-")) + if (STREQ (infile, "-")) istream = stdin; else istream = fopen (infile, "r"); if (istream == NULL) error (EXIT_FAILURE, errno, "%s", infile); - if (!strcmp (outfile, "-")) + if (STREQ (outfile, "-")) ostream = stdout; else ostream = fopen (outfile, "w"); @@ -379,7 +379,7 @@ main (int argc, char **argv) if (show_help) usage (0); - if (optind >= 2 && strcmp (argv[optind - 1], "--") != 0) + if (optind >= 2 && !STREQ (argv[optind - 1], "--")) { /* Interpret non-option arguments with leading `+' only if we haven't seen `--'. */ -- cgit v1.2.3-54-g00ecf