From f81aaf1fa80f428a55799aa0bb15619db206faa9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 1 Jun 2004 13:05:27 +0000 Subject: [PATCH] (swallow_file_in_memory, main): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'. --- src/ptx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ptx.c b/src/ptx.c index 4fef056370..0697019c4e 100644 --- a/src/ptx.c +++ b/src/ptx.c @@ -513,7 +513,7 @@ swallow_file_in_memory (const char *file_name, BLOCK *block) /* As special cases, a file name which is NULL or "-" indicates standard input, which is already opened. In all other cases, open the file from its name. */ - bool using_stdin = !file_name || !*file_name || strcmp (file_name, "-") == 0; + bool using_stdin = !file_name || !*file_name || STREQ (file_name, "-"); if (using_stdin) file_handle = STDIN_FILENO; else @@ -2127,7 +2127,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"), for (file_index = 0; file_index < number_input_files; file_index++) { input_file_name[file_index] = argv[optind]; - if (!*argv[optind] || strcmp (argv[optind], "-") == 0) + if (!*argv[optind] || STREQ (argv[optind], "-")) input_file_name[0] = NULL; else input_file_name[0] = argv[optind]; @@ -2142,7 +2142,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"), number_input_files = 1; input_file_name = xmalloc (sizeof *input_file_name); file_line_count = xmalloc (sizeof *file_line_count); - if (!*argv[optind] || strcmp (argv[optind], "-") == 0) + if (!*argv[optind] || STREQ (argv[optind], "-")) input_file_name[0] = NULL; else input_file_name[0] = argv[optind]; -- 2.47.3