]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lslocks: fix shadow declaration
authorSami Kerola <kerolasa@iki.fi>
Wed, 25 Jul 2012 19:15:26 +0000 (21:15 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 26 Jul 2012 11:18:35 +0000 (13:18 +0200)
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>
misc-utils/lslocks.c

index 094224de68ae2056451dfa891a3f3ad78348d4a0..45fb6de9760c29b5dd2f35eed3c2b6b574db1bc5 100644 (file)
@@ -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;