[asterisk-commits] eliel: branch group/data_api_gsoc2009 r204751 - /team/group/data_api_gsoc2009...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 2 12:55:56 CDT 2009


Author: eliel
Date: Thu Jul  2 12:55:52 2009
New Revision: 204751

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=204751
Log:
Use ast_strdupa instead of strdupa and avoid checking for failure.


Modified:
    team/group/data_api_gsoc2009/main/data.c

Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=204751&r1=204750&r2=204751
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Thu Jul  2 12:55:52 2009
@@ -317,10 +317,7 @@
 	struct data_provider *child;
 	int ret = 0;
 
-	rpath = strdupa(path);
-	if (!rpath) {
-		return -1;
-	}
+	rpath = ast_strdupa(path);
 
 	node_name = next_node_name(&rpath);
 	if (!node_name) {
@@ -710,9 +707,6 @@
 	}
 
 	tmp_path = ast_strdupa(search_path);
-	if (!tmp_path) {
-		return NULL;
-	}
 
 	/* start searching the root node name */
 	node_name = next_node_name(&tmp_path);




More information about the asterisk-commits mailing list