diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/oscar/rxhandlers.c | 10 | ||||
-rw-r--r-- | protocols/purple/purple.c | 4 |
2 files changed, 4 insertions, 10 deletions
diff --git a/protocols/oscar/rxhandlers.c b/protocols/oscar/rxhandlers.c index 6ff106b2..0f1bb3d7 100644 --- a/protocols/oscar/rxhandlers.c +++ b/protocols/oscar/rxhandlers.c @@ -234,14 +234,8 @@ int aim_conn_addhandler(aim_session_t *sess, aim_conn_t *conn, guint16 family, g { struct aim_rxcblist_s *newcb; - if (!conn) { - return -1; - } - - if (checkdisallowed(family, type)) { - g_assert(0); - return -1; - } + g_return_val_if_fail(conn, -1); + g_return_val_if_fail(checkdisallowed(family, type), -1); if (!(newcb = (struct aim_rxcblist_s *) g_new0(struct aim_rxcblist_s, 1))) { return -1; diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index 9e0dc57e..4c560818 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -1689,8 +1689,8 @@ void purple_initmodule() return; } - g_assert((int) B_EV_IO_READ == (int) PURPLE_INPUT_READ); - g_assert((int) B_EV_IO_WRITE == (int) PURPLE_INPUT_WRITE); + g_return_if_fail((int) B_EV_IO_READ == (int) PURPLE_INPUT_READ); + g_return_if_fail((int) B_EV_IO_WRITE == (int) PURPLE_INPUT_WRITE); dir = g_strdup_printf("%s/purple", global.conf->configdir); purple_util_set_user_dir(dir); |