comparison 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
comparison
equal deleted inserted replaced
32784:5aca97a40e53 32785:c9da7f5fbd0e
179 179
180 static void 180 static void
181 jingle_content_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) 181 jingle_content_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
182 { 182 {
183 JingleContent *content; 183 JingleContent *content;
184
185 g_return_if_fail(object != NULL);
184 g_return_if_fail(JINGLE_IS_CONTENT(object)); 186 g_return_if_fail(JINGLE_IS_CONTENT(object));
185 187
186 content = JINGLE_CONTENT(object); 188 content = JINGLE_CONTENT(object);
187 189
188 switch (prop_id) { 190 switch (prop_id) {
223 225
224 static void 226 static void
225 jingle_content_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) 227 jingle_content_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
226 { 228 {
227 JingleContent *content; 229 JingleContent *content;
230
231 g_return_if_fail(object != NULL);
228 g_return_if_fail(JINGLE_IS_CONTENT(object)); 232 g_return_if_fail(JINGLE_IS_CONTENT(object));
229 233
230 content = JINGLE_CONTENT(object); 234 content = JINGLE_CONTENT(object);
231 235
232 switch (prop_id) { 236 switch (prop_id) {
452 } 456 }
453 457
454 xmlnode * 458 xmlnode *
455 jingle_content_to_xml(JingleContent *content, xmlnode *jingle, JingleActionType action) 459 jingle_content_to_xml(JingleContent *content, xmlnode *jingle, JingleActionType action)
456 { 460 {
461 g_return_val_if_fail(content != NULL, NULL);
457 g_return_val_if_fail(JINGLE_IS_CONTENT(content), NULL); 462 g_return_val_if_fail(JINGLE_IS_CONTENT(content), NULL);
458 return JINGLE_CONTENT_GET_CLASS(content)->to_xml(content, jingle, action); 463 return JINGLE_CONTENT_GET_CLASS(content)->to_xml(content, jingle, action);
459 } 464 }
460 465
461 void 466 void
462 jingle_content_handle_action(JingleContent *content, xmlnode *xmlcontent, JingleActionType action) 467 jingle_content_handle_action(JingleContent *content, xmlnode *xmlcontent, JingleActionType action)
463 { 468 {
469 g_return_if_fail(content != NULL);
464 g_return_if_fail(JINGLE_IS_CONTENT(content)); 470 g_return_if_fail(JINGLE_IS_CONTENT(content));
465 JINGLE_CONTENT_GET_CLASS(content)->handle_action(content, xmlcontent, action); 471 JINGLE_CONTENT_GET_CLASS(content)->handle_action(content, xmlcontent, action);
466 } 472 }
467 473