aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-02-29 11:40:28 -0600
committerRob Landley <rob@landley.net>2016-02-29 11:40:28 -0600
commit1b3fd4a5dc3fb62a96fb3127070c5aca7cc2ee3e (patch)
tree2abde76b4104bae9903f7aea8618e390c84040ab /toys
parent830f2561757083ec6d34dc92c675447e91c9ed81 (diff)
downloadtoybox-1b3fd4a5dc3fb62a96fb3127070c5aca7cc2ee3e.tar.gz
Fix inverted test.
Diffstat (limited to 'toys')
-rw-r--r--toys/pending/file.c2
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";