diff options
author | Dan McGee <dan@archlinux.org> | 2008-05-04 19:15:49 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-08 20:58:33 -0500 |
commit | a13bf7497948b27786a1d568264d91b8fa60491b (patch) | |
tree | 4d3a46608f22de92a92fa86ccd417694bc1907de /src/pacman/package.c | |
parent | 5389cdf65431e6daf219b9bb8f8985c6c33b1996 (diff) | |
download | pacman-a13bf7497948b27786a1d568264d91b8fa60491b.tar.xz |
pacman-side code cleanups
When taking a look at PATH_MAX usage, I found a few small things we can
clean up or fix.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/package.c')
-rw-r--r-- | src/pacman/package.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c index 7019e7e6..76e8e4fd 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -225,17 +225,14 @@ void dump_pkg_files(pmpkg_t *pkg) { const char *pkgname, *root, *filestr; alpm_list_t *i, *pkgfiles; - char path[PATH_MAX]; pkgname = alpm_pkg_get_name(pkg); pkgfiles = alpm_pkg_get_files(pkg); root = alpm_option_get_root(); for(i = pkgfiles; i; i = alpm_list_next(i)) { - filestr = (char*)alpm_list_getdata(i); - /* build a path so we can stat the filename */ - snprintf(path, PATH_MAX-1, "%s%s", root, filestr); - fprintf(stdout, "%s %s\n", pkgname, path); + filestr = alpm_list_getdata(i); + fprintf(stdout, "%s %s%s\n", pkgname, root, filestr); } fflush(stdout); |