From: nicm Date: Fri, 29 May 2015 15:11:08 +0000 (+0000) Subject: Don't stop at the first successful test unless it has generated some X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5e39175e484c50deef704d3e55348f31ad185793;p=openbsd Don't stop at the first successful test unless it has generated some output. --- 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 *