From 519d7a95a3f8103925aa84f9bdef326ce88d37cc Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 23 Jun 2007 10:11:25 +0200 Subject: Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0. * src/base64.c (main): Likewise. * src/install.c (setdefaultfilecon): Likewise. * src/sort.c (main): Likewise. * Makefile.maint (sc_prohibit_strcmp): New rule. * .x-sc_prohibit_strcmp: New file, to list the few exceptions. * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp. --- src/base64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/base64.c') diff --git a/src/base64.c b/src/base64.c index 4a278278e..3a38ccf5c 100644 --- a/src/base64.c +++ b/src/base64.c @@ -296,7 +296,7 @@ main (int argc, char **argv) else infile = "-"; - if (strcmp (infile, "-") == 0) + if (STREQ (infile, "-")) input_fh = stdin; else { @@ -312,7 +312,7 @@ main (int argc, char **argv) if (fclose (input_fh) == EOF) { - if (strcmp (infile, "-") == 0) + if (STREQ (infile, "-")) error (EXIT_FAILURE, errno, _("closing standard input")); else error (EXIT_FAILURE, errno, "%s", infile); -- cgit v1.2.3-54-g00ecf