Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-24 19:42:51 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-24 19:42:51 +0000
commitca61a8998744d31efa9497f6a46f20d9e5fc9452 (patch)
treeac2d262b76e7cdcf9e0f256c8ac7eae2b4fb421a /src
parentabbb2cfcf045a8f309a233030154b6316be813de (diff)
slighlty improved efficiency for dump_pkg_full()
Diffstat (limited to 'src')
-rw-r--r--src/pacman/package.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index d151fd54..2e363c56 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -37,7 +37,6 @@
void dump_pkg_full(PM_PKG *pkg, int level)
{
char *date;
- PM_LIST *backup;
if(pkg == NULL) {
return;
@@ -56,7 +55,6 @@ void dump_pkg_full(PM_PKG *pkg, int level)
date = alpm_pkg_getinfo(pkg, PM_PKG_BUILDDATE);
printf("Build Date : %s %s\n", date, strlen(date) ? "UTC" : "");
-
date = alpm_pkg_getinfo(pkg, PM_PKG_INSTALLDATE);
printf("Install Date : %s %s\n", date, strlen(date) ? "UTC" : "");
@@ -84,14 +82,12 @@ void dump_pkg_full(PM_PKG *pkg, int level)
indentprint(alpm_pkg_getinfo(pkg, PM_PKG_DESC), 17);
printf("\n");
- backup = alpm_pkg_getinfo(pkg, PM_PKG_BACKUP);
- if(level > 1 && backup) {
+ if(level > 1) {
PM_LIST *i;
char *root;
-
alpm_get_option(PM_OPT_ROOT, (long *)&root);
fprintf(stdout, "\n");
- for(i = alpm_list_first(backup); i; i = alpm_list_next(i)) {
+ for(i = alpm_list_first(alpm_pkg_getinfo(pkg, PM_PKG_BACKUP)); i; i = alpm_list_next(i)) {
struct stat buf;
char path[PATH_MAX];
char *md5sum;