summaryrefslogtreecommitdiff
path: root/src/ptx.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-01 13:05:27 +0000
committerJim Meyering <jim@meyering.net>2004-06-01 13:05:27 +0000
commitf81aaf1fa80f428a55799aa0bb15619db206faa9 (patch)
tree853a97264837b9bd91ba5cc9410f47d06b16d42e /src/ptx.c
parentae752755d24ab10b8861dbf25a1d3d7c6b9499b6 (diff)
downloadcoreutils-f81aaf1fa80f428a55799aa0bb15619db206faa9.tar.xz
(swallow_file_in_memory, main):
Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.
Diffstat (limited to 'src/ptx.c')
-rw-r--r--src/ptx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ptx.c b/src/ptx.c
index 4fef05637..0697019c4 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];