summaryrefslogtreecommitdiff
path: root/src/uniq.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-04-12 09:27:45 +0000
committerJim Meyering <jim@meyering.net>1998-04-12 09:27:45 +0000
commitd4257e63c7956d7a77349f0e3b693afa5e1ab9df (patch)
tree37c7c7ae817f492796a4b084772a4e2c39acedb9 /src/uniq.c
parent7154d646cb343aa28459ffbfb5a1ca7057f3c8d7 (diff)
downloadcoreutils-d4257e63c7956d7a77349f0e3b693afa5e1ab9df.tar.xz
Use STREQ rather than strcmp
Diffstat (limited to 'src/uniq.c')
-rw-r--r--src/uniq.c6
1 files changed, 3 insertions, 3 deletions
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 `--'. */