# HG changeset patch # User Paul Aurich # Date 1319320551 0 # Node ID c9da7f5fbd0e606eb12c46979102088ecfb4261e # Parent 5aca97a40e53823456ee02284766cee64d1a718a jabber: Add a few extra g_return_if_fails to the Jingle code These are entirely superfluous (the JINGLE_IS_* macros check for non-nullness), but they silence some false-positives from clang diff -r 5aca97a40e53 -r c9da7f5fbd0e libpurple/protocols/jabber/jingle/content.c --- a/libpurple/protocols/jabber/jingle/content.c Fri Oct 21 14:38:35 2011 +0000 +++ b/libpurple/protocols/jabber/jingle/content.c Sat Oct 22 21:55:51 2011 +0000 @@ -181,6 +181,8 @@ jingle_content_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { JingleContent *content; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_CONTENT(object)); content = JINGLE_CONTENT(object); @@ -225,6 +227,8 @@ jingle_content_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { JingleContent *content; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_CONTENT(object)); content = JINGLE_CONTENT(object); @@ -454,6 +458,7 @@ xmlnode * jingle_content_to_xml(JingleContent *content, xmlnode *jingle, JingleActionType action) { + g_return_val_if_fail(content != NULL, NULL); g_return_val_if_fail(JINGLE_IS_CONTENT(content), NULL); return JINGLE_CONTENT_GET_CLASS(content)->to_xml(content, jingle, action); } @@ -461,6 +466,7 @@ void jingle_content_handle_action(JingleContent *content, xmlnode *xmlcontent, JingleActionType action) { + g_return_if_fail(content != NULL); g_return_if_fail(JINGLE_IS_CONTENT(content)); JINGLE_CONTENT_GET_CLASS(content)->handle_action(content, xmlcontent, action); } diff -r 5aca97a40e53 -r c9da7f5fbd0e libpurple/protocols/jabber/jingle/iceudp.c --- a/libpurple/protocols/jabber/jingle/iceudp.c Fri Oct 21 14:38:35 2011 +0000 +++ b/libpurple/protocols/jabber/jingle/iceudp.c Sat Oct 22 21:55:51 2011 +0000 @@ -202,6 +202,8 @@ jingle_iceudp_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { JingleIceUdp *iceudp; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_ICEUDP(object)); iceudp = JINGLE_ICEUDP(object); @@ -225,6 +227,8 @@ jingle_iceudp_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { JingleIceUdp *iceudp; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_ICEUDP(object)); iceudp = JINGLE_ICEUDP(object); diff -r 5aca97a40e53 -r c9da7f5fbd0e libpurple/protocols/jabber/jingle/rawudp.c --- a/libpurple/protocols/jabber/jingle/rawudp.c Fri Oct 21 14:38:35 2011 +0000 +++ b/libpurple/protocols/jabber/jingle/rawudp.c Sat Oct 22 21:55:51 2011 +0000 @@ -174,6 +174,8 @@ jingle_rawudp_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { JingleRawUdp *rawudp; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_RAWUDP(object)); rawudp = JINGLE_RAWUDP(object); @@ -197,6 +199,8 @@ jingle_rawudp_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { JingleRawUdp *rawudp; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_RAWUDP(object)); rawudp = JINGLE_RAWUDP(object); diff -r 5aca97a40e53 -r c9da7f5fbd0e libpurple/protocols/jabber/jingle/session.c --- a/libpurple/protocols/jabber/jingle/session.c Fri Oct 21 14:38:35 2011 +0000 +++ b/libpurple/protocols/jabber/jingle/session.c Sat Oct 22 21:55:51 2011 +0000 @@ -189,6 +189,8 @@ jingle_session_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { JingleSession *session; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_SESSION(object)); session = JINGLE_SESSION(object); @@ -231,6 +233,8 @@ jingle_session_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { JingleSession *session; + + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_SESSION(object)); session = JINGLE_SESSION(object); diff -r 5aca97a40e53 -r c9da7f5fbd0e libpurple/protocols/jabber/jingle/transport.c --- a/libpurple/protocols/jabber/jingle/transport.c Fri Oct 21 14:38:35 2011 +0000 +++ b/libpurple/protocols/jabber/jingle/transport.c Sat Oct 22 21:55:51 2011 +0000 @@ -108,6 +108,7 @@ static void jingle_transport_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_TRANSPORT(object)); switch (prop_id) { @@ -120,6 +121,7 @@ static void jingle_transport_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { + g_return_if_fail(object != NULL); g_return_if_fail(JINGLE_IS_TRANSPORT(object)); switch (prop_id) { @@ -170,6 +172,7 @@ xmlnode * jingle_transport_to_xml(JingleTransport *transport, xmlnode *content, JingleActionType action) { + g_return_val_if_fail(transport != NULL, NULL); g_return_val_if_fail(JINGLE_IS_TRANSPORT(transport), NULL); return JINGLE_TRANSPORT_GET_CLASS(transport)->to_xml(transport, content, action); }