Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.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/alpm.c
parent05ab859eab8dbe14f1957d0a4e64b3f005630d45 (diff)
Code update to make use of PKG_FULLNAME_LEN
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index fd8641b1..f7a1ec34 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -378,8 +378,8 @@ void *alpm_pkg_getinfo(pmpkg_t *pkg, unsigned char parm)
case PM_PKG_REASON:
case PM_PKG_MD5SUM:
if(!(pkg->infolevel & INFRQ_DESC)) {
- char target[(PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1];
- snprintf(target, (PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1, "%s-%s", pkg->name, pkg->version);
+ char target[PKG_FULLNAME_LEN];
+ snprintf(target, PKG_FULLNAME_LEN, "%s-%s", pkg->name, pkg->version);
db_read(pkg->data, target, INFRQ_DESC, pkg);
}
break;
@@ -392,8 +392,8 @@ void *alpm_pkg_getinfo(pmpkg_t *pkg, unsigned char parm)
case PM_PKG_PROVIDES:
case PM_PKG_REPLACES:
if(!(pkg->infolevel & INFRQ_DEPENDS)) {
- char target[(PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1];
- snprintf(target, (PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1, "%s-%s", pkg->name, pkg->version);
+ char target[PKG_FULLNAME_LEN];
+ snprintf(target, PKG_FULLNAME_LEN, "%s-%s", pkg->name, pkg->version);
db_read(pkg->data, target, INFRQ_DEPENDS, pkg);
}
break;*/
@@ -401,16 +401,16 @@ void *alpm_pkg_getinfo(pmpkg_t *pkg, unsigned char parm)
case PM_PKG_FILES:
case PM_PKG_BACKUP:
if(pkg->data == handle->db_local && !(pkg->infolevel & INFRQ_FILES)) {
- char target[(PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1];
- snprintf(target, (PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1, "%s-%s", pkg->name, pkg->version);
+ char target[PKG_FULLNAME_LEN];
+ snprintf(target, PKG_FULLNAME_LEN, "%s-%s", pkg->name, pkg->version);
db_read(pkg->data, target, INFRQ_FILES, pkg);
}
break;
/* Scriptlet */
case PM_PKG_SCRIPLET:
if(pkg->data == handle->db_local && !(pkg->infolevel & INFRQ_SCRIPLET)) {
- char target[(PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1];
- snprintf(target, (PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1, "%s-%s", pkg->name, pkg->version);
+ char target[PKG_FULLNAME_LEN];
+ snprintf(target, PKG_FULLNAME_LEN, "%s-%s", pkg->name, pkg->version);
db_read(pkg->data, target, INFRQ_SCRIPLET, pkg);
}
break;