changeset 15901:ab2f466b6a13

Get rid of an unnecessary strdup
author Mark Doliner <mark@kingant.net>
date Sun, 25 Mar 2007 00:45:40 +0000
parents 9cfe41743c65
children 3a45be1c3281
files libpurple/plugin.c
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugin.c	Sun Mar 25 00:41:31 2007 +0000
+++ b/libpurple/plugin.c	Sun Mar 25 00:45:40 2007 +0000
@@ -369,12 +369,12 @@
 		return plugin;
 	}
 
-	/* 
- 	 * Check to make sure a plugin has defined an id.
- 	 * Not having this check caused purple_plugin_unload to
- 	 * enter an infinite loop in certain situations by passing
- 	 * purple_find_plugin_by_id a NULL value. -- ecoffey
- 	 */
+	/*
+	 * Check to make sure a plugin has defined an id.
+	 * Not having this check caused purple_plugin_unload to
+	 * 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, ""))
 	{
 		plugin->error = g_strdup_printf(_("This plugin has not defined an ID."));
@@ -672,12 +672,10 @@
 		{
 			if (!purple_plugin_unload(dep_plugin))
 			{
-				char *translated_name = g_strdup(_(dep_plugin->info->name));
 				char *tmp;
 
 				tmp = g_strdup_printf(_("The dependent plugin %s failed to unload."),
-				                      translated_name);
-				g_free(translated_name);
+				                      _(dep_plugin->info->name));
 
 				purple_notify_error(NULL, NULL,
 				                  _("There were errors unloading the plugin."), tmp);