[asterisk-commits] rmudgett: branch 13 r433420 - in /branches/13: main/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 25 13:37:06 CDT 2015


Author: rmudgett
Date: Wed Mar 25 13:37:04 2015
New Revision: 433420

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433420
Log:
A couple minor cleanup tweaks.

* In res/res_sorcery_realtime.c: Broke long line.

* In main/bucket.c: Eliminated unnecessary NULL check as
ast_sorcery_unref() is NULL tolerant and set the global object to NULL
after unref in the system shutdown bucket_cleanup().

Modified:
    branches/13/main/bucket.c
    branches/13/res/res_sorcery_realtime.c

Modified: branches/13/main/bucket.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/bucket.c?view=diff&rev=433420&r1=433419&r2=433420
==============================================================================
--- branches/13/main/bucket.c (original)
+++ branches/13/main/bucket.c Wed Mar 25 13:37:04 2015
@@ -882,9 +882,8 @@
 /*! \brief Cleanup function for graceful shutdowns */
 static void bucket_cleanup(void)
 {
-	if (bucket_sorcery) {
-		ast_sorcery_unref(bucket_sorcery);
-	}
+	ast_sorcery_unref(bucket_sorcery);
+	bucket_sorcery = NULL;
 
 	ast_sorcery_wizard_unregister(&bucket_wizard);
 	ast_sorcery_wizard_unregister(&bucket_file_wizard);

Modified: branches/13/res/res_sorcery_realtime.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_sorcery_realtime.c?view=diff&rev=433420&r1=433419&r2=433420
==============================================================================
--- branches/13/res/res_sorcery_realtime.c (original)
+++ branches/13/res/res_sorcery_realtime.c Wed Mar 25 13:37:04 2015
@@ -158,7 +158,9 @@
 
 	objectset = sorcery_realtime_filter_objectset(objectset, &id, sorcery, type);
 
-	if (!id || !(object = ast_sorcery_alloc(sorcery, type, id->value)) || ast_sorcery_objectset_apply(sorcery, object, objectset)) {
+	if (!id
+		|| !(object = ast_sorcery_alloc(sorcery, type, id->value))
+		|| ast_sorcery_objectset_apply(sorcery, object, objectset)) {
 		return NULL;
 	}
 




More information about the asterisk-commits mailing list