about summary refs log tree commit diff stats
path: root/src/xmpp/presence.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp/presence.c')
-rw-r--r--src/xmpp/presence.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index 84f2873e..6ba3573a 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -300,11 +300,11 @@ presence_send(const resource_presence_t presence_type, const char *const msg, co
 static void
 _send_room_presence(xmpp_stanza_t *presence)
 {
-    GList *rooms_p = muc_rooms();
-    GList *rooms = rooms_p;
+    GList *rooms = muc_rooms();
+    GList *curr = rooms;
 
-    while (rooms) {
-        const char *room = rooms->data;
+    while (curr) {
+        const char *room = curr->data;
         const char *nick = muc_nick(room);
 
         if (nick) {
@@ -316,12 +316,10 @@ _send_room_presence(xmpp_stanza_t *presence)
             free(full_room_jid);
         }
 
-        rooms = g_list_next(rooms);
+        curr = g_list_next(curr);
     }
 
-    if (rooms_p) {
-        g_list_free(rooms_p);
-    }
+    g_list_free(rooms);
 }
 
 void