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 <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
/*
* 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;