xbps_remove_pkg_from_dict_by_name: simplify.
This commit is contained in:
parent
5a1ab26972
commit
b64fb39701
@ -56,7 +56,7 @@
|
|||||||
*/
|
*/
|
||||||
#define XBPS_PKGINDEX_VERSION "1.3"
|
#define XBPS_PKGINDEX_VERSION "1.3"
|
||||||
|
|
||||||
#define XBPS_API_VERSION "20111224-1"
|
#define XBPS_API_VERSION "20111224-2"
|
||||||
#define XBPS_VERSION "0.12"
|
#define XBPS_VERSION "0.12"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,13 +126,12 @@ xbps_remove_pkg_from_dict_by_name(prop_dictionary_t dict,
|
|||||||
assert(pkgname != NULL);
|
assert(pkgname != NULL);
|
||||||
|
|
||||||
array = prop_dictionary_get(dict, key);
|
array = prop_dictionary_get(dict, key);
|
||||||
if (array == NULL)
|
if (array == NULL) {
|
||||||
|
errno = ENOENT;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!xbps_remove_pkg_from_array_by_name(array, pkgname))
|
return xbps_remove_pkg_from_array_by_name(array, pkgname);
|
||||||
return false;
|
|
||||||
|
|
||||||
return prop_dictionary_set(dict, key, array);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
Loading…
Reference in New Issue
Block a user