diff options
author | Ron <ron@debian.org> | 2009-06-27 04:44:24 +0930 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-07-05 20:27:17 -0400 |
commit | 916bd8eff0cac4abfd816b95f104064965623f3f (patch) | |
tree | f3763653b8e87f8ad26152d9ab8a456bb597253b /utils/ldconfig.c | |
parent | 95fa074d64848a0e4db471d6546b91ad60048d52 (diff) |
Don't shadow stat with a local variable
Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'utils/ldconfig.c')
-rw-r--r-- | utils/ldconfig.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/ldconfig.c b/utils/ldconfig.c index 505316b15..139b5f9cb 100644 --- a/utils/ldconfig.c +++ b/utils/ldconfig.c @@ -558,18 +558,18 @@ static char *get_extpath(void) { char *res = NULL, *cp; FILE *file; - struct stat stat; + struct stat st; char realconffile[BUFFER_SIZE]; if (!chroot_realpath(chroot_dir, conffile, realconffile)) return NULL; if ((file = fopen(realconffile, "r")) != NULL) { - fstat(fileno(file), &stat); - res = xmalloc(stat.st_size + 1); - fread(res, 1, stat.st_size, file); + fstat(fileno(file), &st); + res = xmalloc(st.st_size + 1); + fread(res, 1, st.st_size, file); fclose(file); - res[stat.st_size] = '\0'; + res[st.st_size] = '\0'; /* convert comments fo spaces */ for (cp = res; *cp; /*nada */ ) { |