about summary refs log tree commit diff stats
path: root/src/muc.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-26 00:36:36 +0100
committerJames Booth <boothj5@gmail.com>2014-04-26 00:36:36 +0100
commitd6e92f62dc907d5da66f477884a4c0c728b84127 (patch)
treee77d8ad400874baa5edd7dde9ce66b1847fd89e9 /src/muc.c
parentab4ea80a70803d8d6335d8f5a8a4248e6d5423a4 (diff)
downloadprofani-tty-d6e92f62dc907d5da66f477884a4c0c728b84127.tar.gz
Fixed cppcheck warnings
Diffstat (limited to 'src/muc.c')
-rw-r--r--src/muc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/muc.c b/src/muc.c
index 88b5e2cd..9db485c0 100644
--- a/src/muc.c
+++ b/src/muc.c
@@ -494,10 +494,8 @@ muc_complete_roster_nick_change(const char * const room,
 
     if (chat_room != NULL) {
         char *old_nick = g_hash_table_lookup(chat_room->nick_changes, nick);
-        char *old_nick_cpy;
-
         if (old_nick != NULL) {
-            old_nick_cpy = strdup(old_nick);
+            char *old_nick_cpy = strdup(old_nick);
             g_hash_table_remove(chat_room->nick_changes, nick);
 
             return old_nick_cpy;
@@ -543,4 +541,4 @@ gint _compare_participants(PContact a, PContact b)
     g_free(key_b);
 
     return result;
-}
\ No newline at end of file
+}