comparison libpurple/plugin.c @ 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 80ee585fb53c
children 2b8d4fabc103
comparison
equal deleted inserted replaced
15888:6577b292e7b4 15939:4a7a13521709
373 * Check to make sure a plugin has defined an id. 373 * Check to make sure a plugin has defined an id.
374 * Not having this check caused purple_plugin_unload to 374 * Not having this check caused purple_plugin_unload to
375 * enter an infinite loop in certain situations by passing 375 * enter an infinite loop in certain situations by passing
376 * purple_find_plugin_by_id a NULL value. -- ecoffey 376 * purple_find_plugin_by_id a NULL value. -- ecoffey
377 */ 377 */
378 if (!plugin->info->id || !strcmp(plugin->info->id, "")) 378 if (plugin->info->id == NULL || *plugin->info->id == '\0')
379 { 379 {
380 plugin->error = g_strdup_printf(_("This plugin has not defined an ID.")); 380 plugin->error = g_strdup_printf(_("This plugin has not defined an ID."));
381 purple_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path); 381 purple_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path);
382 plugin->unloadable = TRUE; 382 plugin->unloadable = TRUE;
383 return plugin; 383 return plugin;