index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-18 16:52:57 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-18 16:52:57 +0000 |
commit | 86b136bb592bf576a3da950fee153f6d4f5b9d15 (patch) | |
tree | f6289e427de5c5b2cfd3e3d37b75fc9506eb3bdb /lib/libalpm/be_files.c | |
parent | 46e26ac5c8d15fbb2385ad972f2f69891a0bd8d0 (diff) |
-rw-r--r-- | lib/libalpm/be_files.c | 12 |
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index 62d08dd3..e722f626 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -180,7 +180,7 @@ int _alpm_db_read(pmdb_t *db, unsigned int inforeq, pmpkg_t *info) FILE *fp = NULL; struct stat buf; char path[PATH_MAX+1]; - char line[513] = {0}; + char line[513]; pmlist_t *tmplist; char *locale; @@ -205,7 +205,7 @@ int _alpm_db_read(pmdb_t *db, unsigned int inforeq, pmpkg_t *info) _alpm_log(PM_LOG_FUNCTION, _("loading package data for %s : level=%d"), info->name, inforeq); /* clear out 'line', to be certain - and to make valgrind happy */ - memset(line, 513, 0); + memset(line, 0, 513); snprintf(path, PATH_MAX, "%s/%s-%s", db->path, info->name, info->version); if(stat(path, &buf)) { @@ -528,20 +528,20 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, unsigned int inforeq) } if(info->size) { fprintf(fp, "%%SIZE%%\n" - "%ld\n\n", info->size); + "%lu\n\n", info->size); } if(info->reason) { fprintf(fp, "%%REASON%%\n" - "%d\n\n", info->reason); + "%u\n\n", info->reason); } } else { if(info->size) { fprintf(fp, "%%CSIZE%%\n" - "%ld\n\n", info->size); + "%lu\n\n", info->size); } if(info->isize) { fprintf(fp, "%%ISIZE%%\n" - "%ld\n\n", info->isize); + "%lu\n\n", info->isize); } if(info->sha1sum) { fprintf(fp, "%%SHA1SUM%%\n" |