diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-10-05 04:33:45 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-10-05 04:33:45 +0200 |
commit | e1b2be31a79dd229b60ceea121d6933b154c3bc0 (patch) | |
tree | 66790604816d6ceafcc426388af56e879d1ceb7e /src/common.c | |
parent | 4df0522641275edaee6d7a65eab9ca3f913dfdce (diff) |
move ca_proplist_merge_ap()/ca_proplist_from_ap() to proplist.c where it belongs
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/common.c b/src/common.c index 78cf921..39766e6 100644 --- a/src/common.c +++ b/src/common.c @@ -313,49 +313,6 @@ int ca_context_open(ca_context *c) { return ret; } -int ca_proplist_merge_ap(ca_proplist *p, va_list ap) { - int ret; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - - for (;;) { - const char *key, *value; - - if (!(key = va_arg(ap, const char*))) - break; - - if (!(value = va_arg(ap, const char*))) - return CA_ERROR_INVALID; - - if ((ret = ca_proplist_sets(p, key, value)) < 0) - return ret; - } - - return CA_SUCCESS; -} - -int ca_proplist_from_ap(ca_proplist **_p, va_list ap) { - int ret; - ca_proplist *p; - - ca_return_val_if_fail(_p, CA_ERROR_INVALID); - - if ((ret = ca_proplist_create(&p)) < 0) - return ret; - - if ((ret = ca_proplist_merge_ap(p, ap)) < 0) - goto fail; - - *_p = p; - - return CA_SUCCESS; - -fail: - ca_assert_se(ca_proplist_destroy(p) == CA_SUCCESS); - - return ret; -} - /** * ca_context_change_props: * @c: the context to set the properties on. |