[asterisk-commits] mjordan: branch group/bridge_construction r385394 - /team/group/bridge_constr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 11 20:32:45 CDT 2013


Author: mjordan
Date: Thu Apr 11 20:32:42 2013
New Revision: 385394

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385394
Log:
Don't return the value of ao2_link

1) It returns 1 on success; 0 on error. Most things don't expect that.
2) If ao2_link does fail, you've gone into troubled waters
3) We don't typically check the success/failure of it anywhere else.


Modified:
    team/group/bridge_construction/main/strings.c

Modified: team/group/bridge_construction/main/strings.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/main/strings.c?view=diff&rev=385394&r1=385393&r2=385394
==============================================================================
--- team/group/bridge_construction/main/strings.c (original)
+++ team/group/bridge_construction/main/strings.c Thu Apr 11 20:32:42 2013
@@ -185,5 +185,6 @@
 
 	/* safe strcpy */
 	strcpy(ao2_add, add);
-	return ao2_link(str_container, ao2_add);
+	ao2_link(str_container, ao2_add);
+	return 0;
 }




More information about the asterisk-commits mailing list