Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_files.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-08-14 10:14:35 -0400
committerDan McGee <dan@archlinux.org>2007-08-14 10:14:35 -0400
commita65ad4efc1102449a087b464d3b8d4670a614b99 (patch)
tree3131b4392641667c5d289d87eaccca976244aee1 /lib/libalpm/be_files.c
parent49c29e16b31ce35e81be210bc74a3834530bb9e0 (diff)
package.h: implement origin_data union in pmpkg_t struct
We were using a void *data element in pmpkg_t before, which is unsafe by its nature of being untyped. Reimplement data as origin_data being a union that can hold either a path to a package file or a pointer to a cache database, and make the other necesary updates in the code to reflect this. See package.h for details. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_files.c')
-rw-r--r--lib/libalpm/be_files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index dc89f32f..de0381eb 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -221,8 +221,8 @@ pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target)
/* TODO removed corrupt entry from the FS here */
_alpm_pkg_free(pkg);
} else {
- pkg->data = db;
pkg->origin = PKG_FROM_CACHE;
+ pkg->origin_data.db = db;
}
}