summaryrefslogtreecommitdiff
path: root/src/wc.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-07-23 05:47:57 +0000
committerJim Meyering <jim@meyering.net>2003-07-23 05:47:57 +0000
commit3d0b2cc66a6d520094364e6af8d4f6fad49521c9 (patch)
treee9cd201350648029395528c5e5566d86b182f8e3 /src/wc.c
parenta68226bb5b81fd6ffd5d65b8529a07c19e17811a (diff)
downloadcoreutils-3d0b2cc66a6d520094364e6af8d4f6fad49521c9.tar.xz
(wc): Fix typo in computation of file from file_x,
which caused the former to be used uninitialized if file_x was nonzero.
Diffstat (limited to 'src/wc.c')
-rw-r--r--src/wc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wc.c b/src/wc.c
index 8647fd77d..1ddd71105 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -208,7 +208,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus)
size_t bytes_read;
uintmax_t lines, words, chars, bytes, linelength;
int count_bytes, count_chars, count_complicated;
- char const *file = file_x == NULL ? _("standard input") : file;
+ char const *file = file_x ? file_x : _("standard input");
lines = words = chars = bytes = linelength = 0;