From 58e88f1074dc7703aba3b5660eaaf17c3a0b7476 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 29 May 2015 15:11:09 +0000 Subject: Don't stop at the first successful test unless it has generated some output. --- usr.bin/file/magic-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/file') 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 @@ -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 * -- cgit v1.2.3