From 8ffb82a691d08511e7436ba0f2fc63f8822e9a4e Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sat, 8 Oct 2005 21:36:47 +0000 Subject: Code update to make use of PKG_FULLNAME_LEN --- lib/libalpm/add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 6c6fc6b6..6fcc6442 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -328,8 +328,8 @@ int add_commit(pmtrans_t *trans, pmdb_t *db) oldpkg = pkg_new(); if(oldpkg) { if(!(local->infolevel & INFRQ_FILES)) { - char name[(PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1]; - snprintf(name, (PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1, "%s-%s", local->name, local->version); + char name[PKG_FULLNAME_LEN]; + snprintf(name, PKG_FULLNAME_LEN, "%s-%s", local->name, local->version); _alpm_log(PM_LOG_DEBUG, "loading FILES info for %s", local->name); db_read(db, name, INFRQ_FILES, local); } -- cgit v1.2.3