summaryrefslogtreecommitdiff
path: root/lib/ext2fs/get_pathname.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext2fs/get_pathname.c')
-rw-r--r--lib/ext2fs/get_pathname.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ext2fs/get_pathname.c b/lib/ext2fs/get_pathname.c
index 33209949..52aea624 100644
--- a/lib/ext2fs/get_pathname.c
+++ b/lib/ext2fs/get_pathname.c
@@ -100,16 +100,16 @@ static errcode_t ext2fs_get_pathname_int(ext2_filsys fs, ext2_ino_t dir,
retval = ext2fs_dir_iterate(fs, dir, 0, buf, get_pathname_proc, &gp);
if (retval == EXT2_ET_NO_DIRECTORY) {
- char buf[32];
+ char tmp[32];
if (ino)
- snprintf(buf, sizeof(buf), "<%u>/<%u>", dir, ino);
+ snprintf(tmp, sizeof(tmp), "<%u>/<%u>", dir, ino);
else
- snprintf(buf, sizeof(buf), "<%u>", dir);
- retval = ext2fs_get_mem(strlen(buf)+1, name);
+ snprintf(tmp, sizeof(tmp), "<%u>", dir);
+ retval = ext2fs_get_mem(strlen(tmp)+1, name);
if (retval)
goto cleanup;
- strcpy(*name, buf);
+ strcpy(*name, tmp);
return 0;
} else if (retval)
goto cleanup;