FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-20-2011, 12:17 AM
Dan McGee
 
Default utils/cleanupdelta: remove unneeded syncdbpath

This variable was totally unused.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
src/util/cleanupdelta.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c
index a45efdc..8ce74f9 100644
--- a/src/util/cleanupdelta.c
+++ b/src/util/cleanupdelta.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <limits.h> /* PATH_MAX */

#include <alpm.h>
#include <alpm_list.h>
@@ -68,19 +67,17 @@ static void checkpkgs(alpm_list_t *pkglist)
}

static void checkdbs(const char *dbpath, alpm_list_t *dbnames) {
- char syncdbpath[PATH_MAX];
alpm_db_t *db = NULL;
alpm_list_t *i;
const alpm_siglevel_t level = ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;

for(i = dbnames; i; i = alpm_list_next(i)) {
- char *dbname = alpm_list_getdata(i);
- snprintf(syncdbpath, PATH_MAX, "%s/sync/%s", dbpath, dbname);
+ const char *dbname = alpm_list_getdata(i);
db = alpm_db_register_sync(handle, dbname, level);
if(db == NULL) {
- fprintf(stderr, "error: could not register sync database (%s)
",
- alpm_strerror(alpm_errno(handle)));
- return;
+ fprintf(stderr, "error: could not register sync database '%s' (%s)
",
+ dbname, alpm_strerror(alpm_errno(handle)));
+ continue;
}
checkpkgs(alpm_db_get_pkgcache(db));
}
--
1.7.6.1
 

Thread Tools




All times are GMT. The time now is 05:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org