[Asterisk-cvs] asterisk/include/asterisk utils.h,1.48,1.49

kpfleming kpfleming
Mon Oct 31 13:22:56 CST 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv3988/include/asterisk

Modified Files:
	utils.h 
Log Message:
don't pass short arguments by value, it will cause compiler warnings on most platforms about implicit conversions (thanks Luigi!)


Index: utils.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/utils.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- utils.h	29 Oct 2005 13:03:23 -0000	1.48
+++ utils.h	31 Oct 2005 18:15:02 -0000	1.49
@@ -169,11 +169,11 @@
  */
 void ast_uri_decode(char *s);
 
-static inline void ast_slinear_saturated_add(short *input, short value)
+static inline void ast_slinear_saturated_add(short *input, short *value)
 {
 	int res;
 
-	res = (int) *input + value;
+	res = (int) *input + *value;
 	if (res > 32767)
 		*input = 32767;
 	else if (res < -32767)
@@ -182,11 +182,11 @@
 		*input = (short) res;
 }
 	
-static inline void ast_slinear_saturated_multiply(short *input, short value)
+static inline void ast_slinear_saturated_multiply(short *input, short *value)
 {
 	int res;
 
-	res = (int) *input * value;
+	res = (int) *input * *value;
 	if (res > 32767)
 		*input = 32767;
 	else if (res < -32767)
@@ -195,9 +195,9 @@
 		*input = (short) res;
 }
 
-static inline void ast_slinear_saturated_divide(short *input, short value)
+static inline void ast_slinear_saturated_divide(short *input, short *value)
 {
-	*input /= value;
+	*input /= *value;
 }
 
 extern int test_for_thread_safety(void);




More information about the svn-commits mailing list