summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2008-12-18 13:08:17 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-12-18 13:08:17 +0000
commitdfb9fcfbba3e196b4c082cc9b8a1fe7b80ac8564 (patch)
tree9f95192064596cc9c3430dca2310c8c177e5f66b
parent874e5b1209b31e33e3ea64146d559bee5df36e46 (diff)
removing some lint warnings
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@440 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c8
-rw-r--r--radsecproxy.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 7edc949..90f8bc7 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -172,12 +172,12 @@ static const struct protodefs protodefs[] = {
1, /* freesrcprotores */
initextradtls /* initextra */
},
- { NULL
+ { NULL, NULL, 0, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
}
};
uint8_t protoname2int(const char *name) {
- int i;
+ uint8_t i;
for (i = 0; protodefs[i].name && strcasecmp(protodefs[i].name, name); i++);
return i;
@@ -322,7 +322,7 @@ int resolvepeer(struct clsrvconf *conf, int ai_flags) {
freeaddrinfo(addrinfo);
return 0;
}
- conf->prefixlen = plen;
+ conf->prefixlen = (uint8_t)plen;
} else
conf->prefixlen = 255;
}
@@ -403,7 +403,7 @@ void freeclsrvres(struct clsrvconf *res) {
/* returns 1 if the len first bits are equal, else 0 */
int prefixmatch(void *a1, void *a2, uint8_t len) {
static uint8_t mask[] = { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
- int r, l = len / 8;
+ uint8_t r, l = len / 8;
if (l && memcmp(a1, a2, l))
return 0;
r = len % 8;
diff --git a/radsecproxy.h b/radsecproxy.h
index a67d88d..fd48964 100644
--- a/radsecproxy.h
+++ b/radsecproxy.h
@@ -181,7 +181,7 @@ struct rewrite {
struct protodefs {
char *name;
char *secretdefault;
- uint8_t socktype;
+ int socktype;
char *portdefault;
uint8_t retrycountdefault;
uint8_t retrycountmax;