Fix xbps_unregister_repository() func cb.
While here, change a var type to ssize_t... int64_t is overkill. --HG-- extra : convert_revision : d5128f9d0c7da549fa2894d42b4a012c68478473
This commit is contained in:
parent
3c7b8186e6
commit
cfd928d563
|
@ -35,13 +35,13 @@
|
||||||
|
|
||||||
struct callback_args {
|
struct callback_args {
|
||||||
const char *string;
|
const char *string;
|
||||||
int64_t number;
|
ssize_t number;
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
xbps_remove_string_from_array(prop_object_t obj, void *arg, bool *loop_done)
|
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;
|
struct callback_args *cb = arg;
|
||||||
|
|
||||||
assert(prop_object_type(obj) == PROP_TYPE_STRING);
|
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++;
|
idx++;
|
||||||
|
|
||||||
return EINVAL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -194,8 +194,8 @@ xbps_unregister_repository(const char *uri)
|
||||||
|
|
||||||
/* Update plist file. */
|
/* Update plist file. */
|
||||||
if (prop_dictionary_externalize_to_file(dict, plist)) {
|
if (prop_dictionary_externalize_to_file(dict, plist)) {
|
||||||
free(cb);
|
|
||||||
prop_object_release(dict);
|
prop_object_release(dict);
|
||||||
|
free(cb);
|
||||||
free(plist);
|
free(plist);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue