don't pass short arguments by value, it will cause compiler warnings on most platforms about implicit conversions (thanks Luigi!)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-10-31 18:15:02 +00:00
parent 8fb55e2478
commit a40e852ed3
2 changed files with 13 additions and 9 deletions

View File

@@ -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);