From: Sami Kerola Date: Wed, 25 Jul 2012 19:15:26 +0000 (+0200) Subject: lslocks: fix shadow declaration X-Git-Tag: v2.22-rc1~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e35c4a12e1103b1849cc06bb747e87afa5baf094;p=thirdparty%2Futil-linux.git lslocks: fix shadow declaration misc-utils/lslocks.c:157:49: warning: declaration of 'pid' shadows a global declaration [-Wshadow] misc-utils/lslocks.c:80:14: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak --- diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c index 094224de68..45fb6de976 100644 --- a/misc-utils/lslocks.c +++ b/misc-utils/lslocks.c @@ -104,12 +104,12 @@ static void disable_columns_truncate(void) /* * Return a PID's command name */ -static char *get_cmdname(pid_t pid) +static char *get_cmdname(pid_t id) { FILE *fp; char path[PATH_MAX], *ret = NULL; - sprintf(path, "/proc/%d/comm", pid); + sprintf(path, "/proc/%d/comm", id); if (!(fp = fopen(path, "r"))) return NULL;