[trivial PATCH 16/22] [otp_util.c] eliminate build warnings

Wang Tinggong wangtinggong at gmail.com
Mon Feb 1 18:30:30 CET 2010


Signed-off-by: Wang Tinggong <wangtinggong at gmail.com>
---
 src/modules/rlm_otp/otp_util.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/rlm_otp/otp_util.c b/src/modules/rlm_otp/otp_util.c
index 4087381..0259cea 100644
--- a/src/modules/rlm_otp/otp_util.c
+++ b/src/modules/rlm_otp/otp_util.c
@@ -34,7 +34,7 @@ RCSID("$Id$")
  * Return some random bytes.
  */
 void
-otp_get_random(char *rnd_data, size_t len)
+otp_get_random(unsigned char *rnd_data, size_t len)
 {
   size_t bytes_read = 0;
 
@@ -70,10 +70,10 @@ otp_async_challenge(char challenge[OTP_MAX_CHALLENGE_LEN + 1], int len)
 
 /* ascii to hex; returns HEXlen on success or -1 on error */
 int
-otp_a2x(const char *s, unsigned char x[])
+otp_a2x(const unsigned char *s, unsigned char x[])
 {
   unsigned i;
-  size_t l = strlen(s);
+  size_t l = strlen((const char*)s);
 
   /*
    * We could just use sscanf, but we do this a lot, and have very
-- 
1.6.0.6



More information about the Freeradius-Devel mailing list