summaryrefslogtreecommitdiff
path: root/usr.bin/file
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-05-29 15:11:09 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-05-29 15:11:09 +0000
commit58e88f1074dc7703aba3b5660eaaf17c3a0b7476 (patch)
tree7e52ef83958a134636c39f2f3e9df613479eeab9 /usr.bin/file
parent0c90355e8ac5e10c0c92caaaa9a446c106493b14 (diff)
Don't stop at the first successful test unless it has generated some
output.
Diffstat (limited to 'usr.bin/file')
-rw-r--r--usr.bin/file/magic-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/file/magic-test.c b/usr.bin/file/magic-test.c
index 7394c0fbcb2..35dbf104f08 100644
--- a/usr.bin/file/magic-test.c
+++ b/usr.bin/file/magic-test.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magic-test.c,v 1.4 2015/05/29 14:52:10 nicm Exp $ */
+/* $OpenBSD: magic-test.c,v 1.5 2015/05/29 15:11:08 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -1087,7 +1087,7 @@ magic_test_line(struct magic_line *ml, struct magic_state *ms)
ms->offset = offset;
magic_test_line(child, ms);
}
- return (1);
+ return (ml->result != NULL);
}
const char *