diff options
author | Karel Zak | 2012-07-25 21:15:27 +0200 |
---|---|---|
committer | Karel Zak | 2012-07-26 13:27:06 +0200 |
commit | af842d142ee334bf4851329eda48ca69f8bfe0d9 (patch) | |
tree | 663c35d705f7faa0b23cabc755881293b9294898 /misc-utils/whereis.c | |
parent | lslocks: fix shadow declaration (diff) | |
download | kernel-qcow2-util-linux-af842d142ee334bf4851329eda48ca69f8bfe0d9.tar.gz kernel-qcow2-util-linux-af842d142ee334bf4851329eda48ca69f8bfe0d9.tar.xz kernel-qcow2-util-linux-af842d142ee334bf4851329eda48ca69f8bfe0d9.zip |
whereis: fix shadow declaration
misc-utils/whereis.c:191:7: warning: declaration of 'dirp' shadows a global declaration [-Wshadow]
misc-utils/whereis.c:134:42: warning: shadowed declaration is here [-Wshadow]
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/whereis.c')
-rw-r--r-- | misc-utils/whereis.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index 6807b8a68..05af8e0b8 100644 --- a/misc-utils/whereis.c +++ b/misc-utils/whereis.c @@ -131,7 +131,7 @@ static char *srcdirs[] = { }; static char sflag = 1, bflag = 1, mflag = 1, uflag; -static char **Sflag, **Bflag, **Mflag, **dirp, **pathdir; +static char **Sflag, **Bflag, **Mflag, **pathdir, **pathdir_p; static int Scnt, Bcnt, Mcnt, count, print; static void __attribute__ ((__noreturn__)) usage(FILE * out) @@ -283,7 +283,7 @@ static void fillpath(void) pathdir = xrealloc(pathdir, (i + 1) * sizeof(char *)); pathdir[i] = NULL; - dirp = pathdir; + pathdir_p = pathdir; free(pathcp); } @@ -314,8 +314,8 @@ lookbin(char *cp) { if (Bflag == 0) { findv(bindirs, ARRAY_SIZE(bindirs)-1, cp); - while (*dirp) - findin(*dirp++, cp); /* look $PATH */ + while (*pathdir_p) + findin(*pathdir_p++, cp); /* look $PATH */ } else findv(Bflag, Bcnt, cp); } |