im.pidgin.cpw.resiak.disconnectreason: e6345a558603f231b12cc7c4bac3f6bdbaa26635

resiak at soc.pidgin.im resiak at soc.pidgin.im
Wed Oct 10 11:20:39 EDT 2007


-----------------------------------------------------------------
Revision: e6345a558603f231b12cc7c4bac3f6bdbaa26635
Ancestor: a2b64f1757510e3f25716a6c0497cd4fa17dcfb3
Author: resiak at soc.pidgin.im
Date: 2007-10-09T15:03:48
Branch: im.pidgin.cpw.resiak.disconnectreason

Modified files:
        libpurple/connection.c

ChangeLog: 

datallah pointed out that using g_return_if_fail() is preferable to
g_assert()ing.

-------------- next part --------------
============================================================
--- libpurple/connection.c	9a675b6653a914a2ce3297f3e2bc275ecc489306
+++ libpurple/connection.c	fc01c2829ad61d81db7fd8e72625f9cf4a98329d
@@ -502,7 +502,7 @@ purple_connection_error_reason (PurpleCo
 	PurpleConnectionUiOps *ops;
 
 	g_return_if_fail(gc   != NULL);
-	g_assert (reason < PURPLE_NUM_REASONS);
+	g_return_if_fail(reason < PURPLE_NUM_REASONS);
 
 	if (description == NULL) {
 		purple_debug_error("connection", "purple_connection_error_reason: check `description != NULL' failed\n");
@@ -575,6 +575,8 @@ purple_connection_reason_is_fatal (Purpl
 		case PURPLE_REASON_INVALID_SETTINGS:
 		case PURPLE_REASON_OTHER_ERROR:
 			return TRUE;
+		default:
+			g_return_val_if_reached(TRUE);
 	}
 }
 


More information about the Commits mailing list