summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-10-08 21:36:47 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-10-08 21:36:47 +0000
commit8ffb82a691d08511e7436ba0f2fc63f8822e9a4e (patch)
tree5e2c8824daac847d37eaade52b810fa0794710ff /lib/libalpm/sync.c
parent05ab859eab8dbe14f1957d0a4e64b3f005630d45 (diff)
downloadpacman-8ffb82a691d08511e7436ba0f2fc63f8822e9a4e.tar.xz
Code update to make use of PKG_FULLNAME_LEN
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c4
1 files changed, 2 insertions, 2 deletions
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';