From 5e39175e484c50deef704d3e55348f31ad185793 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 29 May 2015 15:11:08 +0000 Subject: [PATCH] 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(-) 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 * -- 2.20.1