]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
whereis: improve readability for analysers
authorKarel Zak <kzak@redhat.com>
Fri, 7 Sep 2012 11:34:38 +0000 (13:34 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 7 Sep 2012 11:43:49 +0000 (13:43 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/whereis.c

index 05af8e0b821abc0db5a35e111873193138b3a298..ae4cc03286d0e8b1156f971d187f196ee23055bf 100644 (file)
@@ -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;