Mercurial > pidgin
diff libpurple/protocols/null/nullprpl.c @ 31905:323876c34a96
Don't use strlen() when all you're trying to do is check if the string
is empty
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 22 Aug 2011 02:07:41 +0000 |
parents | 3322201b446f |
children | e8d4755ef84b |
line wrap: on
line diff
--- a/libpurple/protocols/null/nullprpl.c Mon Aug 22 01:53:37 2011 +0000 +++ b/libpurple/protocols/null/nullprpl.c Mon Aug 22 02:07:41 2011 +0000 @@ -234,7 +234,7 @@ const char *message = purple_status_get_attr_string(status, "message"); char *text; - if (message && strlen(message) > 0) + if (message && *message) text = g_strdup_printf("%s: %s", name, message); else text = g_strdup(name); @@ -933,7 +933,7 @@ purple_conv_chat_set_topic(to, username, topic); - if (topic && strlen(topic) > 0) + if (topic && *topic) msg = g_strdup_printf(_("%s sets topic to: %s"), username, topic); else msg = g_strdup_printf(_("%s clears topic"), username);