[asterisk-commits] rmudgett: trunk r433421 - in /trunk: ./ main/bucket.c res/res_sorcery_realtime.c

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


Author: rmudgett
Date: Wed Mar 25 13:37:51 2015
New Revision: 433421

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433421
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().
........

Merged revisions 433420 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/main/bucket.c
    trunk/res/res_sorcery_realtime.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/main/bucket.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/bucket.c?view=diff&rev=433421&r1=433420&r2=433421
==============================================================================
--- trunk/main/bucket.c (original)
+++ trunk/main/bucket.c Wed Mar 25 13:37:51 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: trunk/res/res_sorcery_realtime.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_sorcery_realtime.c?view=diff&rev=433421&r1=433420&r2=433421
==============================================================================
--- trunk/res/res_sorcery_realtime.c (original)
+++ trunk/res/res_sorcery_realtime.c Wed Mar 25 13:37:51 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