about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2013-01-12 23:23:40 +0200
committerDmitry Podgorny <pasis.ua@gmail.com>2013-01-12 23:23:40 +0200
commitdb9c9ab091c40bf2249010816cd0831520afc2e0 (patch)
treeed81f987198cb4c84d10240faa04bbcd7f77b551 /src
parent83c3fe5b7e90f7cdf5326128fc2151719c01c6d5 (diff)
downloadprofani-tty-db9c9ab091c40bf2249010816cd0831520afc2e0.tar.gz
set NULL only when resource != NULL in FREE_SET_NULL
Diffstat (limited to 'src')
-rw-r--r--src/jabber.c7
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