From cfd928d5631ac7b4fa6609590c7ced2daa67c89e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 14 Feb 2009 01:50:18 +0100 Subject: [PATCH] Fix xbps_unregister_repository() func cb. While here, change a var type to ssize_t... int64_t is overkill. --HG-- extra : convert_revision : d5128f9d0c7da549fa2894d42b4a012c68478473 --- lib/repository.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/repository.c b/lib/repository.c index 537688fcdc9..0a5ac0a2804 100644 --- a/lib/repository.c +++ b/lib/repository.c @@ -35,13 +35,13 @@ struct callback_args { const char *string; - int64_t number; + ssize_t number; }; int xbps_remove_string_from_array(prop_object_t obj, void *arg, bool *loop_done) { - static int64_t idx; + static ssize_t idx; struct callback_args *cb = arg; assert(prop_object_type(obj) == PROP_TYPE_STRING); @@ -53,7 +53,7 @@ xbps_remove_string_from_array(prop_object_t obj, void *arg, bool *loop_done) } idx++; - return EINVAL; + return 0; } bool @@ -194,8 +194,8 @@ xbps_unregister_repository(const char *uri) /* Update plist file. */ if (prop_dictionary_externalize_to_file(dict, plist)) { - free(cb); prop_object_release(dict); + free(cb); free(plist); return true; }