changeset 15939:4a7a13521709

A small fix to the patch from ecoffey: Gary pointed out that the strcmp() was unnecessary and that the logic could be made more clear.
author Richard Laager <rlaager@wiktel.com>
date Sat, 24 Mar 2007 20:25:01 +0000
parents 6577b292e7b4
children 2b8d4fabc103
files libpurple/plugin.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugin.c	Sat Mar 24 19:51:48 2007 +0000
+++ b/libpurple/plugin.c	Sat Mar 24 20:25:01 2007 +0000
@@ -375,7 +375,7 @@
  	 * enter an infinite loop in certain situations by passing
  	 * purple_find_plugin_by_id a NULL value. -- ecoffey
  	 */
-	if (!plugin->info->id || !strcmp(plugin->info->id, ""))
+	if (plugin->info->id == NULL || *plugin->info->id == '\0')
 	{
 		plugin->error = g_strdup_printf(_("This plugin has not defined an ID."));
 		purple_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path);