Mercurial > pidgin.yaz
comparison libpurple/protocols/null/nullprpl.c @ 32365:e8d4755ef84b
Don't use strlen() when you're just checking whether a string is
empty
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 22 Aug 2011 02:11:36 +0000 |
parents | 323876c34a96 |
children | 1d8d8649f015 |
comparison
equal
deleted
inserted
replaced
32364:323876c34a96 | 32365:e8d4755ef84b |
---|---|
779 | 779 |
780 /* parse args */ | 780 /* parse args */ |
781 to_username = args[0]; | 781 to_username = args[0]; |
782 message = args[1]; | 782 message = args[1]; |
783 | 783 |
784 if (!to_username || strlen(to_username) == 0) { | 784 if (!to_username || !*to_username) { |
785 *error = g_strdup(_("Whisper is missing recipient.")); | 785 *error = g_strdup(_("Whisper is missing recipient.")); |
786 return PURPLE_CMD_RET_FAILED; | 786 return PURPLE_CMD_RET_FAILED; |
787 } else if (!message || strlen(message) == 0) { | 787 } else if (!message || !*message) { |
788 *error = g_strdup(_("Whisper is missing message.")); | 788 *error = g_strdup(_("Whisper is missing message.")); |
789 return PURPLE_CMD_RET_FAILED; | 789 return PURPLE_CMD_RET_FAILED; |
790 } | 790 } |
791 | 791 |
792 from_username = conv->account->username; | 792 from_username = conv->account->username; |