index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2005-10-08 21:36:47 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-10-08 21:36:47 +0000 |
commit | 8ffb82a691d08511e7436ba0f2fc63f8822e9a4e (patch) | |
tree | 5e2c8824daac847d37eaade52b810fa0794710ff /lib/libalpm/sync.c | |
parent | 05ab859eab8dbe14f1957d0a4e64b3f005630d45 (diff) |
-rw-r--r-- | lib/libalpm/sync.c | 4 |
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'; |