changeset 22131:d5e8ee52ddcc

Use g_strerror() instead of strerror() in a few places.
author Richard Laager <rlaager@wiktel.com>
date Wed, 16 Jan 2008 19:12:46 +0000
parents dd51079b3d8c
children d59cdfcb6ed1
files finch/libgnt/gntmain.c libpurple/protocols/irc/dcc_send.c libpurple/protocols/msnp9/notification.c libpurple/protocols/msnp9/servconn.c libpurple/protocols/zephyr/zephyr.c
diffstat 5 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntmain.c	Wed Jan 16 07:51:44 2008 +0000
+++ b/finch/libgnt/gntmain.c	Wed Jan 16 19:12:46 2008 +0000
@@ -233,7 +233,7 @@
 	{
 		int ch = getch(); /* This should return ERR, but let's see what it really returns */
 		endwin();
-		printf("ERROR: %s\n", strerror(errno));
+		printf("ERROR: %s\n", g_strerror(errno));
 		printf("File descriptor is: %d\n\nGIOChannel is: %p\ngetch() = %d\n", STDIN_FILENO, source, ch);
 		raise(SIGABRT);
 	}
--- a/libpurple/protocols/irc/dcc_send.c	Wed Jan 16 07:51:44 2008 +0000
+++ b/libpurple/protocols/irc/dcc_send.c	Wed Jan 16 19:12:46 2008 +0000
@@ -56,7 +56,7 @@
 	l = htonl(xfer->bytes_sent);
 	result = write(xfer->fd, &l, sizeof(l));
 	if (result != sizeof(l)) {
-		purple_debug_error("irc", "unable to send acknowledgement: %s\n", strerror(errno));
+		purple_debug_error("irc", "unable to send acknowledgement: %s\n", g_strerror(errno));
 		/* TODO: We should probably close the connection here or something. */
 	}
 }
--- a/libpurple/protocols/msnp9/notification.c	Wed Jan 16 07:51:44 2008 +0000
+++ b/libpurple/protocols/msnp9/notification.c	Wed Jan 16 19:12:46 2008 +0000
@@ -1012,7 +1012,7 @@
 	{
 		purple_debug_error("msn",
 						 "Error opening temp passport file: %s\n",
-						 strerror(errno));
+						 g_strerror(errno));
 	}
 	else
 	{
@@ -1061,7 +1061,7 @@
 		{
 			purple_debug_error("msn",
 							 "Error closing temp passport file: %s\n",
-							 strerror(errno));
+							 g_strerror(errno));
 
 			g_unlink(session->passport_info.file);
 			g_free(session->passport_info.file);
--- a/libpurple/protocols/msnp9/servconn.c	Wed Jan 16 07:51:44 2008 +0000
+++ b/libpurple/protocols/msnp9/servconn.c	Wed Jan 16 19:12:46 2008 +0000
@@ -392,7 +392,7 @@
 		return;
 	else if (len <= 0)
 	{
-		purple_debug_error("msn", "servconn read error, len: %d error: %s\n", len, strerror(errno));
+		purple_debug_error("msn", "servconn read error, len: %d error: %s\n", len, g_strerror(errno));
 		msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_READ);
 
 		return;
--- a/libpurple/protocols/zephyr/zephyr.c	Wed Jan 16 07:51:44 2008 +0000
+++ b/libpurple/protocols/zephyr/zephyr.c	Wed Jan 16 19:12:46 2008 +0000
@@ -165,7 +165,7 @@
 		size_t len = strlen(zsubstr);
 		result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zsubstr,len);
 		if (result != len) {
-			purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno));
+			purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno));
 		} else {
 			ret_val = ZERR_NONE;
 		}
@@ -1380,7 +1380,7 @@
 							size_t len = strlen(zlocstr);
 							size_t result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zlocstr,len);
 							if (result != len) {
-								purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno));
+								purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno));
 							}
 							g_free(zlocstr);
 						}
@@ -2293,7 +2293,7 @@
 		len = strlen(zlocstr);
 		result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zlocstr,len);
 		if (result != len) {
-			purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno));
+			purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno));
 		}
 		g_free(zlocstr);
 	}
@@ -2322,7 +2322,7 @@
 			len = strlen(zexpstr);
 			result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zexpstr,len);
 			if (result != len) {
-				purple_debug_error("zephyr", "Unable to write message: %s\n", strerror(errno));
+				purple_debug_error("zephyr", "Unable to write message: %s\n", g_strerror(errno));
 			}
 			g_free(zexpstr);
 		}
@@ -2336,7 +2336,7 @@
 			len = strlen(zexpstr);
 			result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zexpstr,len);
 			if (result != len) {
-				purple_debug_error("zephyr", "Unable to write message: %s\n", strerror(errno));
+				purple_debug_error("zephyr", "Unable to write message: %s\n", g_strerror(errno));
 			}
 			g_free(zexpstr);
 		}