From 8a112182134f300775d10d580a0ee9fa2bad0a13 Mon Sep 17 00:00:00 2001 From: Andreas Henriksson Date: Wed, 9 Jul 2014 14:09:34 +0200 Subject: [PATCH] whereis: fix missing newline on empty results Running "whereis foo.bar.quux" previously resulted in printing the "foo.bar:" pattern prefix without any newline following it. Signed-off-by: Andreas Henriksson --- misc-utils/whereis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index ba83b159bd..dc7406b94b 100644 --- a/misc-utils/whereis.c +++ b/misc-utils/whereis.c @@ -430,7 +430,7 @@ static void lookup(const char *pattern, struct wh_dirlist *ls, int want) free(wait); - if ((count && !uflag) || (uflag && count > 1)) + if (!uflag || (uflag && count > 1)) putchar('\n'); return; } -- 2.47.3