diff options
author | James Booth <boothj5@gmail.com> | 2013-01-13 01:43:18 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-01-13 01:43:18 +0000 |
commit | b6f36673900939ad171b84bb088d82226d06285a (patch) | |
tree | 8956797bc1ccf10fca60e4d1d691503cf745a731 | |
parent | 0827ac344f83cdca587d9d7ec1ac3baeef629edc (diff) | |
download | profani-tty-b6f36673900939ad171b84bb088d82226d06285a.tar.gz |
Moved FREE_SET_NULL to common.h
-rw-r--r-- | src/common.h | 8 | ||||
-rw-r--r-- | src/jabber.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/common.h b/src/common.h index 72623f0c..e12045ad 100644 --- a/src/common.h +++ b/src/common.h @@ -36,6 +36,14 @@ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) +#define FREE_SET_NULL(resource) \ +{ \ + if (resource != NULL) { \ + free(resource); \ + resource = NULL; \ + } \ +} + void p_slist_free_full(GSList *items, GDestroyNotify free_func); void create_dir(char *name); char * str_replace(const char *string, const char *substr, diff --git a/src/jabber.c b/src/jabber.c index d98ec5dc..f65deb93 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -88,14 +88,6 @@ static int _presence_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata); static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata); -#define FREE_SET_NULL(resource) \ -{ \ - if (resource != NULL) { \ - free(resource); \ - resource = NULL; \ - } \ -} - void jabber_init(const int disable_tls) { |