summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7785e12)
raw | patch | inline | side by side (parent: 7785e12)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 22 Mar 2010 19:00:17 +0000 (20:00 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 4 Aug 2010 13:13:50 +0000 (15:13 +0200) |
… rather than the private "config_free" function.
src/amqp.c | patch | blob | history |
diff --git a/src/amqp.c b/src/amqp.c
index 95cded7a42d4da97e97dc93e2f0bab644c28ec90..1767b85f8f8e3660482a7988a1015c894e0a5b0b 100644 (file)
--- a/src/amqp.c
+++ b/src/amqp.c
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static void config_free(char *var)
-{
- if (var != NULL)
- free(var);
-}
-
static int config_set(char **var, const char *value)
{
- config_free(*var);
+ sfree(*var);
if ((*var = strdup(value)) == NULL)
return (1);
return (0);
@@ -177,12 +171,12 @@ static int amqp_write(const data_set_t *ds, const value_list_t *vl, user_data_t
static int shutdown(void)
{
- config_free(host);
- config_free(vhost);
- config_free(user);
- config_free(password);
- config_free(exchange);
- config_free(routingkey);
+ sfree(host);
+ sfree(vhost);
+ sfree(user);
+ sfree(password);
+ sfree(exchange);
+ sfree(routingkey);
return (0);
}