summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-09-05 23:51:53 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-09-05 23:52:09 -0700
commit542ddcf6812ca4d8764caf40ae91a23675bdd1b0 (patch)
tree9ac78c46fe2baaa69ed194e6eeff6a3b9f3d744d
parentb6952a032618af81238050de1e8f21da66546f55 (diff)
Fix some clang integer conversion warnings in cvthexkey()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xfindproxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfindproxy.c b/xfindproxy.c
index 18b1968..775321e 100644
--- a/xfindproxy.c
+++ b/xfindproxy.c
@@ -70,8 +70,8 @@ typedef struct {
static int
cvthexkey(const char *hexstr, char **ptrp) /* turn hex key string into octets */
{
- int i;
- int len = 0;
+ unsigned int i;
+ unsigned int len = 0;
char *retval;
const char *s;
unsigned char *us;
@@ -100,7 +100,7 @@ cvthexkey(const char *hexstr, char **ptrp) /* turn hex key string into octets */
c = *hexstr;
if (isspace(c)) continue; /* already know it is ascii */
if (isupper(c))
- c = tolower(c);
+ c = (char) tolower(c);
if (savec) {
#define atoh(c) ((c) - (((c) >= '0' && (c) <= '9') ? '0' : ('a'-10)))
*us = (unsigned char)((atoh(savec) << 4) + atoh(c));
@@ -113,7 +113,7 @@ cvthexkey(const char *hexstr, char **ptrp) /* turn hex key string into octets */
}
}
*ptrp = retval;
- return len;
+ return (int) len;
}
int