summaryrefslogtreecommitdiffstats
path: root/misc-utils/lslocks.c
diff options
context:
space:
mode:
authorSami Kerola2015-01-01 00:01:21 +0100
committerKarel Zak2015-01-07 10:08:21 +0100
commit7ee26cbf025d915c6c15e2fe877ee92846f5992f (patch)
tree532aa9b7a7f9807a0249830062ac26abd3d682b6 /misc-utils/lslocks.c
parentfallocate: create mode 0666, that's what umask is for (diff)
downloadkernel-qcow2-util-linux-7ee26cbf025d915c6c15e2fe877ee92846f5992f.tar.gz
kernel-qcow2-util-linux-7ee26cbf025d915c6c15e2fe877ee92846f5992f.tar.xz
kernel-qcow2-util-linux-7ee26cbf025d915c6c15e2fe877ee92846f5992f.zip
maint: fix shadow declaration
This change fixes all shadow declarations. The worth while to mention fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16 macro that further expands from include/bits/byteswap.h that has the shadowing. libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow] libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow] That could have caused earlier some unexpected results. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/lslocks.c')
-rw-r--r--misc-utils/lslocks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c
index 045186a14..6dac1879f 100644
--- a/misc-utils/lslocks.c
+++ b/misc-utils/lslocks.c
@@ -162,7 +162,7 @@ static char *get_fallback_filename(dev_t dev)
* Return the absolute path of a file from
* a given inode number (and its size)
*/
-static char *get_filename_sz(ino_t inode, pid_t pid, size_t *size)
+static char *get_filename_sz(ino_t inode, pid_t lock_pid, size_t *size)
{
struct stat sb;
struct dirent *dp;
@@ -180,7 +180,7 @@ static char *get_filename_sz(ino_t inode, pid_t pid, size_t *size)
* iterate the *entire* filesystem searching
* for the damn file.
*/
- sprintf(path, "/proc/%d/fd/", pid);
+ sprintf(path, "/proc/%d/fd/", lock_pid);
if (!(dirp = opendir(path)))
return NULL;