Cleanup and mem leak fix
Improve usage of `gchar` and `char` by setting them correctly Increase usage of `auto_gchar` and `auto_char` Fix 2 mem leaks (rosterwin.c, avatar.c)
This commit is contained in:
@@ -830,8 +830,8 @@ _rosterwin_room(ProfLayoutSplit* layout, ProfMucWin* mucwin)
|
||||
}
|
||||
}
|
||||
|
||||
unreadpos = prefs_get_string(PREF_ROSTER_ROOMS_UNREAD);
|
||||
if ((g_strcmp0(unreadpos, "before") == 0) && privwin->unread > 0) {
|
||||
auto_gchar gchar* unreadpos2 = prefs_get_string(PREF_ROSTER_ROOMS_UNREAD);
|
||||
if ((g_strcmp0(unreadpos2, "before") == 0) && privwin->unread > 0) {
|
||||
g_string_append_printf(privmsg, "(%d) ", privwin->unread);
|
||||
}
|
||||
|
||||
@@ -843,7 +843,7 @@ _rosterwin_room(ProfLayoutSplit* layout, ProfMucWin* mucwin)
|
||||
char* nick = privwin->fulljid + strlen(mucwin->roomjid) + 1;
|
||||
g_string_append(privmsg, nick);
|
||||
|
||||
if ((g_strcmp0(unreadpos, "after") == 0) && privwin->unread > 0) {
|
||||
if ((g_strcmp0(unreadpos2, "after") == 0) && privwin->unread > 0) {
|
||||
g_string_append_printf(privmsg, " (%d)", privwin->unread);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user