diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-31 18:15:02 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-31 18:15:02 +0000 |
commit | e454aed806fe1d1693ddc44fad059f9cf9ecf727 (patch) | |
tree | ced7206d241bc688806ee462de1d72cc8d2399d9 /include/asterisk/utils.h | |
parent | 3b5ed22f129ad87a256092965b6537c8bb86cede (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/asterisk/utils.h')
-rwxr-xr-x | include/asterisk/utils.h | 12 |
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); |