summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-04-14 18:24:45 -0500
committerDan McGee <dan@archlinux.org>2008-04-14 18:24:45 -0500
commitba70c52945c9e568100ca3a4eeb3ea1208d378ad (patch)
treee9a8854ee0ce29449c8c0ce7ac276af118c7b6ba /lib
parent2d991a25ae23ca73a9fd01aacade9e2842c2f9db (diff)
downloadpacman-ba70c52945c9e568100ca3a4eeb3ea1208d378ad.tar.xz
Fix compilation errors on x86_64
Things must have gotten stricter with GCC 4.3 on the '%zd' printf string and this is the first I've tried to compile there. Fix the problem by using size_t instead of int. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index aadb6e2a..ca4cfa9a 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -477,7 +477,7 @@ static int extract_single_file(struct archive *archive,
}
char *backup = NULL;
/* length is tab char, null byte and MD5 (32 char) */
- int backup_len = strlen(oldbackup) + 34;
+ size_t backup_len = strlen(oldbackup) + 34;
MALLOC(backup, backup_len, RET_ERR(PM_ERR_MEMORY, -1));
sprintf(backup, "%s\t%s", oldbackup, hash_pkg);
@@ -606,7 +606,7 @@ static int extract_single_file(struct archive *archive,
char *backup = NULL, *hash = NULL;
char *oldbackup = alpm_list_getdata(b);
/* length is tab char, null byte and MD5 (32 char) */
- int backup_len = strlen(oldbackup) + 34;
+ size_t backup_len = strlen(oldbackup) + 34;
if(!oldbackup || strcmp(oldbackup, entryname) != 0) {
continue;