summaryrefslogtreecommitdiff
path: root/usr.bin/grep
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-12-26 20:59:24 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-12-26 20:59:24 +0000
commitc142be984edea72b334994c3ea4dc5e6f2384bd9 (patch)
tree49a02101adc81fe23e320156d862542bae566f32 /usr.bin/grep
parent6d4de8f423ba78b283301b8f5813d9a78fa4b2e7 (diff)
fts_read returning NULL and errno set is an error. ok ray@
Diffstat (limited to 'usr.bin/grep')
-rw-r--r--usr.bin/grep/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index 9d997f83d44..0af93493a36 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.33 2006/11/17 02:01:29 jaredy Exp $ */
+/* $OpenBSD: util.c,v 1.34 2006/12/26 20:59:23 otto Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -86,6 +86,8 @@ grep_tree(char **argv)
break;
}
}
+ if (errno)
+ err(2, "fts_read");
return c;
}