[trivial PATCH 15/22] [otp_rlm.c] eliminate build warnings
Wang Tinggong
wangtinggong at gmail.com
Mon Feb 1 18:30:06 CET 2010
Signed-off-by: Wang Tinggong <wangtinggong at gmail.com>
---
src/modules/rlm_otp/otp_rlm.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/modules/rlm_otp/otp_rlm.c b/src/modules/rlm_otp/otp_rlm.c
index 2de71d2..11c692f 100644
--- a/src/modules/rlm_otp/otp_rlm.c
+++ b/src/modules/rlm_otp/otp_rlm.c
@@ -242,8 +242,9 @@ otp_authorize(void *instance, REQUEST *request)
int32_t now = htonl(time(NULL)); /* low-order 32 bits on LP64 */
char state[OTP_MAX_RADSTATE_LEN];
- if (otp_gen_state(state, NULL, challenge, inst->challenge_len, 0,
- now, hmac_key) != 0) {
+ if (otp_gen_state(state, NULL, (unsigned char*)challenge,
+ inst->challenge_len, 0,
+ now, hmac_key) != 0) {
(void) radlog(L_ERR, "rlm_otp: %s: failed to generate radstate",__func__);
return RLM_MODULE_FAIL;
}
@@ -318,7 +319,7 @@ otp_authenticate(void *instance, REQUEST *request)
unsigned char raw_state[OTP_MAX_RADSTATE_LEN];
unsigned char rad_state[OTP_MAX_RADSTATE_LEN];
int32_t then; /* state timestamp */
- int e_length; /* expected State length */
+ unsigned int e_length; /* expected State length */
/* set expected State length */
e_length = inst->challenge_len * 2 + 8 + 8 + 32; /* see otp_gen_state() */
--
1.6.0.6
More information about the Freeradius-Devel
mailing list