changeset 9789:51a6a98d276b

[gaim-migrate @ 10657] I'm very picky. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 20 Aug 2004 04:51:47 +0000
parents 1e9ecca6c97e
children f8b2630ca694
files src/ft.c
diffstat 1 files changed, 11 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/ft.c	Fri Aug 20 03:44:46 2004 +0000
+++ b/src/ft.c	Fri Aug 20 04:51:47 2004 +0000
@@ -77,17 +77,10 @@
 	if (ui_ops != NULL && ui_ops->destroy != NULL)
 		ui_ops->destroy(xfer);
 
-	if( xfer->who != NULL )
-		g_free(xfer->who);
-
-	if( xfer->filename != NULL )
-		g_free(xfer->filename);
-
-	if (xfer->remote_ip != NULL) 
-		g_free(xfer->remote_ip);
-
-	if (xfer->local_filename != NULL)
-		g_free(xfer->local_filename);
+	g_free(xfer->who);
+	g_free(xfer->filename);
+	g_free(xfer->remote_ip);
+	g_free(xfer->local_filename);
 
 	g_free(xfer);
 }
@@ -119,12 +112,15 @@
 	xfer->status = status;
 }
 
-
+/*
+ * XXX - I REALLY feel like this should be using strerror.
+ * Also, should this use gaim_xfer_error?
+ */
 static void gaim_xfer_show_file_error(const char *filename)
 {
-	char *msg = NULL;
+	gchar *msg = NULL;
 
-	switch(errno) 
+	switch (errno) 
 	{
 		case ENOENT: 
 			msg = g_strdup_printf(_("%s does not exist.\n"), filename);
@@ -167,7 +163,7 @@
 			break;
 	}
 
-	if( msg != NULL ) {
+	if (msg != NULL) {
 		gaim_notify_error(NULL, NULL, msg, NULL);
 		g_free(msg);
 	}