diff options
author | Andreas Henriksson | 2014-07-09 14:09:34 +0200 |
---|---|---|
committer | Karel Zak | 2014-07-14 15:49:27 +0200 |
commit | 8a112182134f300775d10d580a0ee9fa2bad0a13 (patch) | |
tree | b35c8565c8783c08bbce1cddda38ebdb289f282f /misc-utils/whereis.c | |
parent | libfdisk: make first sector buffer usage more robust (diff) | |
download | kernel-qcow2-util-linux-8a112182134f300775d10d580a0ee9fa2bad0a13.tar.gz kernel-qcow2-util-linux-8a112182134f300775d10d580a0ee9fa2bad0a13.tar.xz kernel-qcow2-util-linux-8a112182134f300775d10d580a0ee9fa2bad0a13.zip |
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 <andreas@fatal.se>
Diffstat (limited to 'misc-utils/whereis.c')
-rw-r--r-- | misc-utils/whereis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index ba83b159b..dc7406b94 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; } |