aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-31 18:15:02 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-31 18:15:02 +0000
commite454aed806fe1d1693ddc44fad059f9cf9ecf727 (patch)
treeced7206d241bc688806ee462de1d72cc8d2399d9 /include
parent3b5ed22f129ad87a256092965b6537c8bb86cede (diff)
don't pass short arguments by value, it will cause compiler warnings on most platforms about implicit conversions (thanks Luigi!)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6901 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/utils.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 2f603a77a..92a228aae 100755
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -169,11 +169,11 @@ char *ast_uri_encode(char *string, char *outbuf, int buflen, int doreserved);
*/
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 @@ static inline void ast_slinear_saturated_add(short *input, short value)
*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 @@ static inline void ast_slinear_saturated_multiply(short *input, short value)
*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);