Mercurial > pidgin
diff libpurple/plugin.c @ 25894:a6e3cb32cdd2
Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
closes #7790
committer: Gary Kramlich <grim@reaperworld.com>
| author | Paul Aurich <paul@darkrain42.org> |
|---|---|
| date | Tue, 06 Jan 2009 03:39:51 +0000 |
| parents | 8282911d5e17 |
| children | 68265bcc8814 |
line wrap: on
line diff
--- a/libpurple/plugin.c Fri Jan 02 22:52:17 2009 +0000 +++ b/libpurple/plugin.c Tue Jan 06 03:39:51 2009 +0000 @@ -218,7 +218,7 @@ g_free(basename); if (plugin != NULL) { - if (!strcmp(filename, plugin->path)) + if (purple_strequal(filename, plugin->path)) return plugin; else if (!purple_plugin_is_unloadable(plugin)) { @@ -357,7 +357,7 @@ return NULL; } else if (plugin->info->ui_requirement && - strcmp(plugin->info->ui_requirement, purple_core_get_ui())) + !purple_strequal(plugin->info->ui_requirement, purple_core_get_ui())) { plugin->error = g_strdup_printf(_("You are using %s, but this plugin requires %s."), purple_core_get_ui(), plugin->info->ui_requirement); @@ -1538,7 +1538,7 @@ for (l = plugins; l != NULL; l = l->next) { plugin = l->data; - if (!strcmp(plugin->info->name, name)) + if (purple_strequal(plugin->info->name, name)) return plugin; } @@ -1554,7 +1554,7 @@ for (l = plugins; l != NULL; l = l->next) { plugin = l->data; - if (plugin->path != NULL && !strcmp(plugin->path, filename)) + if (purple_strequal(plugin->path, filename)) return plugin; } @@ -1577,7 +1577,7 @@ if (plugin->path != NULL) { tmp = purple_plugin_get_basename(plugin->path); - if (!strcmp(tmp, basename)) + if (purple_strequal(tmp, basename)) { g_free(tmp); return plugin; @@ -1603,7 +1603,7 @@ { plugin = l->data; - if (plugin->info->id != NULL && !strcmp(plugin->info->id, id)) + if (purple_strequal(plugin->info->id, id)) return plugin; }
