diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-08-25 14:52:25 +0300 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-08-25 14:52:25 +0300 |
commit | c7ec06ff65f6b49f264d3a3a21c64615c9c1f090 (patch) | |
tree | 98f18821de099da5b914e8e7392bd8a8df1c61df /src/ui/core.c | |
parent | d6c90ac7ca8bd3e32e353b36e1eab54ccabd5eb9 (diff) | |
download | profani-tty-c7ec06ff65f6b49f264d3a3a21c64615c9c1f090.tar.gz |
removed strdup from g_string_append
Diffstat (limited to 'src/ui/core.c')
-rw-r--r-- | src/ui/core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index b33186ec..e73c0a67 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -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, ")"); } |