diff options
author | Karel Zak | 2012-09-07 13:34:38 +0200 |
---|---|---|
committer | Karel Zak | 2012-09-07 13:43:49 +0200 |
commit | 63beec6443a1b2db215c321870b57ffabf4b4b2e (patch) | |
tree | 9bb0cb4d10a6171c4b549d8f49f96ec17c6263df /misc-utils/whereis.c | |
parent | lib/pager: robust work with file descriptors [coverity scan] (diff) | |
download | kernel-qcow2-util-linux-63beec6443a1b2db215c321870b57ffabf4b4b2e.tar.gz kernel-qcow2-util-linux-63beec6443a1b2db215c321870b57ffabf4b4b2e.tar.xz kernel-qcow2-util-linux-63beec6443a1b2db215c321870b57ffabf4b4b2e.zip |
whereis: improve readability for analysers
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/whereis.c')
-rw-r--r-- | misc-utils/whereis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index 05af8e0b8..ae4cc0328 100644 --- a/misc-utils/whereis.c +++ b/misc-utils/whereis.c @@ -216,7 +216,8 @@ findin(char *dir, char *cp) /* refuse excessively long names */ strcpy(dirbuf, dir); d = strchr(dirbuf, '*'); - *d = 0; + if (d) + *d = 0; dirp = opendir(dirbuf); if (dirp == NULL) return; |