More LLVM checks
authorAlan T. DeKok <aland@freeradius.org>
Fri, 8 May 2009 13:00:41 +0000 (15:00 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 8 May 2009 13:00:41 +0000 (15:00 +0200)
src/main/radsniff.c
src/modules/rlm_otp/otp_pw_valid.c
src/modules/rlm_otp/otp_rlm.c

index db7dc27..488f127 100644 (file)
@@ -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);
 
index 79badb6..d05516f 100644 (file)
@@ -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;
   }
 
index 5a58f6f..2de71d2 100644 (file)
@@ -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__);