From: Alan T. DeKok Date: Fri, 8 May 2009 13:00:41 +0000 (+0200) Subject: More LLVM checks X-Git-Tag: release_2_1_7~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=570f38b5fd33fef0b6b5f9a895adc22353eb43cf;p=thirdparty%2Ffreeradius-server.git More LLVM checks --- diff --git a/src/main/radsniff.c b/src/main/radsniff.c index db7dc2777ce..488f127ff56 100644 --- a/src/main/radsniff.c +++ b/src/main/radsniff.c @@ -142,7 +142,7 @@ static void got_packet(uint8_t *args, const struct pcap_pkthdr *header, const ui /* Define our packet's attributes */ ethernet = (const struct ethernet_header*)(data); - ip = (const struct ip_header*)(data + size_ethernet); + ip = (const struct ip_header*)(ethernet + size_ethernet); udp = (const struct udp_header*)(data + size_ethernet + size_ip); payload = (const uint8_t *)(data + size_ethernet + size_ip + size_udp); diff --git a/src/modules/rlm_otp/otp_pw_valid.c b/src/modules/rlm_otp/otp_pw_valid.c index 79badb66833..d05516f06f3 100644 --- a/src/modules/rlm_otp/otp_pw_valid.c +++ b/src/modules/rlm_otp/otp_pw_valid.c @@ -206,7 +206,7 @@ retry: if (!fdp || fdp->fd == -1) return -1; - if ((rc = otp_write(fdp, (const char *) request, sizeof(*request))) != 0) { + if (otp_write(fdp, (const char *) request, sizeof(*request)) != 0) { return -1; } diff --git a/src/modules/rlm_otp/otp_rlm.c b/src/modules/rlm_otp/otp_rlm.c index 5a58f6fa94e..2de71d281b7 100644 --- a/src/modules/rlm_otp/otp_rlm.c +++ b/src/modules/rlm_otp/otp_rlm.c @@ -175,7 +175,6 @@ otp_authorize(void *instance, REQUEST *request) char challenge[OTP_MAX_CHALLENGE_LEN + 1]; /* +1 for '\0' terminator */ int auth_type_found; - otp_pwe_t pwe; /* Early exit if Auth-Type != inst->name */ { @@ -203,7 +202,7 @@ otp_authorize(void *instance, REQUEST *request) return RLM_MODULE_INVALID; } - if ((pwe = otp_pwe_present(request)) == 0) { + if (otp_pwe_present(request) == 0) { (void) radlog(L_AUTH, "rlm_otp: %s: Attribute \"User-Password\" " "or equivalent required for authentication.", __func__);