removed strdup from g_string_append
This commit is contained in:
@@ -492,15 +492,15 @@ ui_contact_online(const char * const barejid, const char * const resource,
|
||||
|
||||
// use nickname if exists
|
||||
if (p_contact_name(contact) != NULL) {
|
||||
g_string_append(display_str, strdup(p_contact_name(contact)));
|
||||
g_string_append(display_str, p_contact_name(contact));
|
||||
} else {
|
||||
g_string_append(display_str, strdup(barejid));
|
||||
g_string_append(display_str, barejid);
|
||||
}
|
||||
|
||||
// add resource if not default provided by profanity
|
||||
if (strcmp(jid->resourcepart, "__prof_default") != 0) {
|
||||
g_string_append(display_str, " (");
|
||||
g_string_append(display_str, strdup(jid->resourcepart));
|
||||
g_string_append(display_str, jid->resourcepart);
|
||||
g_string_append(display_str, ")");
|
||||
}
|
||||
|
||||
@@ -531,15 +531,15 @@ ui_contact_offline(const char * const from, const char * const show,
|
||||
|
||||
// use nickname if exists
|
||||
if (p_contact_name(contact) != NULL) {
|
||||
g_string_append(display_str, strdup(p_contact_name(contact)));
|
||||
g_string_append(display_str, p_contact_name(contact));
|
||||
} else {
|
||||
g_string_append(display_str, strdup(jidp->barejid));
|
||||
g_string_append(display_str, jidp->barejid);
|
||||
}
|
||||
|
||||
// add resource if not default provided by profanity
|
||||
if (strcmp(jidp->resourcepart, "__prof_default") != 0) {
|
||||
g_string_append(display_str, " (");
|
||||
g_string_append(display_str, strdup(jidp->resourcepart));
|
||||
g_string_append(display_str, jidp->resourcepart);
|
||||
g_string_append(display_str, ")");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user