diff libpurple/protocols/jabber/jingle/content.c @ 32785:c9da7f5fbd0e

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
author Paul Aurich <paul@darkrain42.org>
date Sat, 22 Oct 2011 21:55:51 +0000
parents 4b101cad58e7
children
line wrap: on
line diff
--- 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);
 }