From d57484d99125eb602e71629d7cacf76fc36cdd9c Mon Sep 17 00:00:00 2001 From: dequis Date: Mon, 26 Dec 2016 19:39:18 -0300 Subject: Change some asserts into g_return_if_fail() Because crashing asserts are bad, and maybe this helps fix the captures_build_path issue with debian's reproducible builds (those asserts probably include __FILE__) --- protocols/oscar/rxhandlers.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'protocols/oscar/rxhandlers.c') 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; -- cgit v1.2.3