# HG changeset patch # User Richard Laager # Date 1174767901 0 # Node ID 4a7a135217095ffbc3a82de8444f632dc004db2b # Parent 6577b292e7b46b516674c92eff7b18a75f35ba44 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. diff -r 6577b292e7b4 -r 4a7a13521709 libpurple/plugin.c --- 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);