diff options
Diffstat (limited to 'toys/pending')
-rw-r--r-- | toys/pending/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/file.c b/toys/pending/file.c index 85af0981..49f987c6 100644 --- a/toys/pending/file.c +++ b/toys/pending/file.c @@ -244,7 +244,7 @@ void file_main(void) if (!lstat(name, &sb)) { if (S_ISFIFO(sb.st_mode)) what = "fifo"; else if (S_ISREG(sb.st_mode)) { - int fd = strcmp(name, "-") ? 0 : open(name, O_RDONLY); + int fd = !strcmp(name, "-") ? 0 : open(name, O_RDONLY); if (fd!=-1) { if (sb.st_size == 0) what = "empty"; |