From e35c4a12e1103b1849cc06bb747e87afa5baf094 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 25 Jul 2012 21:15:26 +0200 Subject: [PATCH] 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 --- misc-utils/lslocks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.3