[svn-commits] mmichelson: branch group/CCSS r214645 - in /team/group/CCSS: include/asterisk...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 28 12:48:23 CDT 2009


Author: mmichelson
Date: Fri Aug 28 12:48:19 2009
New Revision: 214645

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214645
Log:
Parenthesize the ternary operation in the ast_calloc. Big
thanks to seanbright for spotting that one.

Also start to be more uniform with the type of the core_id. 
It should be "int" everywhere and not "unsigned int"


Modified:
    team/group/CCSS/include/asterisk/ccss.h
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=214645&r1=214644&r2=214645
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Fri Aug 28 12:48:19 2009
@@ -695,7 +695,7 @@
  * \retval 0 State change successfully queued
  * \retval -1 Unable to queue state change request
  */
-int ast_cc_request_state_change(enum ast_cc_state state, const unsigned int core_id, const char *debug);
+int ast_cc_request_state_change(enum ast_cc_state state, const int core_id, const char *debug);
 
 /*!
  * \since 1.6.4

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=214645&r1=214644&r2=214645
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Aug 28 12:48:19 2009
@@ -738,7 +738,7 @@
 
 struct cc_state_change_args {
 	enum ast_cc_state state;
-	unsigned int core_id;
+	int core_id;
 	char debug[1];
 };
 
@@ -838,11 +838,11 @@
 	return 0;
 }
 
-int ast_cc_request_state_change(enum ast_cc_state state, const unsigned int core_id, 
+int ast_cc_request_state_change(enum ast_cc_state state, const int core_id, 
 		const char *debug)
 {
-	struct cc_state_change_args *args = ast_calloc(1, sizeof(*args) + 
-			ast_strlen_zero(debug) ? 0 : strlen(debug));
+	struct cc_state_change_args *args = ast_calloc(1, sizeof(*args) +
+			(ast_strlen_zero(debug) ? 0 : strlen(debug)));
 
 	if (!args) {
 		return -1;




More information about the svn-commits mailing list