index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-06-27 10:10:08 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-27 10:10:08 -0500 |
commit | f01c6f814a278a3d024d34fed0c219c8cb1e1e33 (patch) | |
tree | 759833d3d7c46bca4f962c5fd442ab3f37d85b14 /lib/libalpm/util.c | |
parent | 77a09c92c66bd06440be0ccb75daf07c620acbee (diff) |
-rw-r--r-- | lib/libalpm/util.c | 18 |
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) { |