From 66f780aee032cc2ca02caa1f9b56e8aba216cd4a Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 7 Jun 2018 18:38:48 +0000 Subject: [PATCH] bsdgrep(1): Don't initialize fts_flags twice Admittedly, this is a clang-scan complaint... but it wasn't wrong. fts_flags is initialized by all cases in the switch(), which should be fairly obvious. Annotate this anyways. --- usr.bin/grep/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index 4da0a5c33af0..5278859c73e8 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -148,9 +148,9 @@ grep_tree(char **argv) bool matched, ok; const char *wd[] = { ".", NULL }; - fts_flags = 0; matched = false; + /* This switch effectively initializes 'fts_flags' */ switch(linkbehave) { case LINK_EXPLICIT: fts_flags = FTS_COMFOLLOW;