diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-01-12 23:23:40 +0200 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-01-12 23:23:40 +0200 |
commit | db9c9ab091c40bf2249010816cd0831520afc2e0 (patch) | |
tree | ed81f987198cb4c84d10240faa04bbcd7f77b551 /src | |
parent | 83c3fe5b7e90f7cdf5326128fc2151719c01c6d5 (diff) | |
download | profani-tty-db9c9ab091c40bf2249010816cd0831520afc2e0.tar.gz |
set NULL only when resource != NULL in FREE_SET_NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/jabber.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jabber.c b/src/jabber.c index 485efadf..a3db7d85 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -88,10 +88,11 @@ static int _presence_handler(xmpp_conn_t * const conn, static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata); #define FREE_SET_NULL(resource) \ -{\ - if (resource != NULL) \ +{ \ + if (resource != NULL) { \ free(resource); \ - resource = NULL; \ + resource = NULL; \ + } \ } void |