[svn-commits] seanbright: trunk r239114 - /trunk/res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jan 11 10:41:47 CST 2010


Author: seanbright
Date: Mon Jan 11 10:41:44 2010
New Revision: 239114

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=239114
Log:
Pass NULL for the ao2_callback function pointer instead of duplicating cb_true.

Modified:
    trunk/res/res_calendar_caldav.c
    trunk/res/res_calendar_exchange.c
    trunk/res/res_calendar_icalendar.c
    trunk/res/res_clialiases.c

Modified: trunk/res/res_calendar_caldav.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_caldav.c?view=diff&rev=239114&r1=239113&r2=239114
==============================================================================
--- trunk/res/res_calendar_caldav.c (original)
+++ trunk/res/res_calendar_caldav.c Mon Jan 11 10:41:44 2010
@@ -68,11 +68,6 @@
 	struct ao2_container *events;
 };
 
-static int cb_true(void *user_data, void *arg, int flags)
-{
-	return CMP_MATCH;
-}
-
 static void caldav_destructor(void *obj)
 {
 	struct caldav_pvt *pvt = obj;
@@ -83,7 +78,7 @@
 	}
 	ast_string_field_free_memory(pvt);
 
-	ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, cb_true, NULL);
+	ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
 
 	ao2_ref(pvt->events, -1);
 }

Modified: trunk/res/res_calendar_exchange.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_exchange.c?view=diff&rev=239114&r1=239113&r2=239114
==============================================================================
--- trunk/res/res_calendar_exchange.c (original)
+++ trunk/res/res_calendar_exchange.c Mon Jan 11 10:41:44 2010
@@ -212,11 +212,6 @@
 	return IKS_OK;
 }
 
-static int cb_true(void *user_data, void *arg, int flags)
-{
-	return CMP_MATCH;
-}
-
 static void exchangecal_destructor(void *obj)
 {
 	struct exchangecal_pvt *pvt = obj;
@@ -227,7 +222,7 @@
 	}
 	ast_string_field_free_memory(pvt);
 
-	ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, cb_true, NULL);
+	ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
 
 	ao2_ref(pvt->events, -1);
 }

Modified: trunk/res/res_calendar_icalendar.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_icalendar.c?view=diff&rev=239114&r1=239113&r2=239114
==============================================================================
--- trunk/res/res_calendar_icalendar.c (original)
+++ trunk/res/res_calendar_icalendar.c Mon Jan 11 10:41:44 2010
@@ -64,11 +64,6 @@
 	struct ao2_container *events;
 };
 
-static int cb_true(void *user_data, void *arg, int flags)
-{
-	return CMP_MATCH;
-}
-
 static void icalendar_destructor(void *obj)
 {
 	struct icalendar_pvt *pvt = obj;
@@ -82,7 +77,7 @@
 	}
 	ast_string_field_free_memory(pvt);
 
-	ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, cb_true, NULL);
+	ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
 
 	ao2_ref(pvt->events, -1);
 }

Modified: trunk/res/res_clialiases.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_clialiases.c?view=diff&rev=239114&r1=239113&r2=239114
==============================================================================
--- trunk/res/res_clialiases.c (original)
+++ trunk/res/res_clialiases.c Mon Jan 11 10:41:44 2010
@@ -168,12 +168,6 @@
 	AST_CLI_DEFINE(alias_show, "Show CLI command aliases"),
 };
 
-/*! \brief Function called to to see if an alias is marked for destruction, they always are! */
-static int alias_marked(void *obj, void *arg, int flags)
-{
-	return CMP_MATCH;
-}
-
 /*! \brief Function called to load or reload the configuration file */
 static void load_config(int reload)
 {
@@ -191,7 +185,7 @@
 
 	/* Destroy any existing CLI aliases */
 	if (reload) {
-		ao2_callback(cli_aliases, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE , alias_marked, NULL);
+		ao2_callback(cli_aliases, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
 	}
 
 	for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {




More information about the svn-commits mailing list