From: Jim Meyering Date: Tue, 1 Jun 2004 13:05:27 +0000 (+0000) Subject: (swallow_file_in_memory, main): X-Git-Tag: v5.3.0~1441 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f81aaf1fa80f428a55799aa0bb15619db206faa9;p=thirdparty%2Fcoreutils.git (swallow_file_in_memory, main): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'. --- 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];