[svn-commits] dlee: branch dlee/stasis-cache-split r394220 - /team/dlee/stasis-cache-split/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 12 15:16:13 CDT 2013


Author: dlee
Date: Fri Jul 12 15:16:12 2013
New Revision: 394220

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394220
Log:
Split up the null checking for clarity

Modified:
    team/dlee/stasis-cache-split/main/stasis_cache_pattern.c

Modified: team/dlee/stasis-cache-split/main/stasis_cache_pattern.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/main/stasis_cache_pattern.c?view=diff&rev=394220&r1=394219&r2=394220
==============================================================================
--- team/dlee/stasis-cache-split/main/stasis_cache_pattern.c (original)
+++ team/dlee/stasis-cache-split/main/stasis_cache_pattern.c Fri Jul 12 15:16:12 2013
@@ -134,14 +134,21 @@
 	}
 
 	one->topic = stasis_topic_create(name);
+	if (!one->topic) {
+		return NULL;
+	}
 	one->topic_cached = stasis_caching_topic_create(one->topic, all->cache);
+	if (!one->topic_cached) {
+		return NULL;
+	}
 
 	one->forward = stasis_forward_all(one->topic, all->topic);
+	if (!one->forward) {
+		return NULL;
+	}
 	one->forward_cached = stasis_forward_all(
 		stasis_caching_get_topic(one->topic_cached), all->topic_cached);
-
-	if (!one->topic || !one->topic_cached || !one->forward ||
-		!one->forward_cached) {
+	if (!one->forward_cached) {
 		return NULL;
 	}
 




More information about the svn-commits mailing list