diff libpurple/protocols/mxit/login.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 a5b556ac1de5
children 4b15c5c68aa4 9d7c8d6f4a66
line wrap: on
line diff
--- a/libpurple/protocols/mxit/login.c	Mon Aug 22 02:07:41 2011 +0000
+++ b/libpurple/protocols/mxit/login.c	Mon Aug 22 02:11:36 2011 +0000
@@ -743,7 +743,7 @@
 	 * if we don't have any info saved from a previous login, we need to get it from the MXit WAP site.
 	 * we do cache it, so this step is only done on the very first login for each account.
 	 */
-	if ( ( session->distcode == NULL ) || ( strlen( session->distcode ) == 0 ) ) {
+	if ( ( session->distcode == NULL ) || ( !*session->distcode ) ) {
 		/* this must be the very first login, so we need to retrieve the user information */
 		get_clientinfo( session );
 	}