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/sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/sync.c') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 0be24b79..27c4dac5 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -247,7 +247,7 @@ error: int sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, char *name) { - char targline[(PKG_NAME_LEN-1)+1+(DB_TREENAME_LEN-1)+1]; + char targline[PKG_FULLNAME_LEN]; char *targ; PMList *j; pmpkg_t *local; @@ -259,7 +259,7 @@ int sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, char *n ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1)); ASSERT(name != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1)); - STRNCPY(targline, name, (PKG_NAME_LEN-1)+1+(DB_TREENAME_LEN-1)+1); + STRNCPY(targline, name, PKG_FULLNAME_LEN); targ = strchr(targline, '/'); if(targ) { *targ = '\0'; -- cgit v1.2.3-70-g09d2