summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-27 10:10:08 -0500
committerDan McGee <dan@archlinux.org>2011-06-27 10:10:08 -0500
commitf01c6f814a278a3d024d34fed0c219c8cb1e1e33 (patch)
tree759833d3d7c46bca4f962c5fd442ab3f37d85b14 /lib/libalpm/util.c
parent77a09c92c66bd06440be0ccb75daf07c620acbee (diff)
downloadpacman-f01c6f814a278a3d024d34fed0c219c8cb1e1e33.tar.xz
Fix several -Wshadow warnings
Only one of these looked like a real red flag, in find_requiredby(), but it doesn't hurt to fix several of them up anyway. Unfortunately, we can't turn this on universally due to things like the sync(), remove(), etc. builtins which we often use as variable names. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 7bd45423..6fbe08ae 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -299,13 +299,13 @@ int _alpm_unpack(pmhandle_t *handle, const char *archive, const char *prefix,
/* If specific files were requested, skip entries that don't match. */
if(list) {
- char *prefix = strdup(entryname);
+ char *entry_prefix = strdup(entryname);
char *p = strstr(prefix,"/");
if(p) {
*(p+1) = '\0';
}
- char *found = alpm_list_find_str(list, prefix);
- free(prefix);
+ char *found = alpm_list_find_str(list, entry_prefix);
+ free(entry_prefix);
if(!found) {
if(archive_read_data_skip(_archive) != ARCHIVE_OK) {
ret = 1;
@@ -487,22 +487,22 @@ int _alpm_run_chroot(pmhandle_t *handle, const char *path, char *const argv[])
} else {
/* this code runs for the parent only (wait on the child) */
int status;
- FILE *pipe;
+ FILE *pipe_file;
close(pipefd[1]);
- pipe = fdopen(pipefd[0], "r");
- if(pipe == NULL) {
+ pipe_file = fdopen(pipefd[0], "r");
+ if(pipe_file == NULL) {
close(pipefd[0]);
retval = 1;
} else {
- while(!feof(pipe)) {
+ while(!feof(pipe_file)) {
char line[PATH_MAX];
- if(fgets(line, PATH_MAX, pipe) == NULL)
+ if(fgets(line, PATH_MAX, pipe_file) == NULL)
break;
alpm_logaction(handle, "%s", line);
EVENT(handle->trans, PM_TRANS_EVT_SCRIPTLET_INFO, line, NULL);
}
- fclose(pipe);
+ fclose(pipe_file);
}
while(waitpid(pid, &status, 0) == -1) {