Fixed size_t printf format for 64-bit targets
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 29 Oct 2008 17:30:23 +0000 (19:30 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 29 Oct 2008 17:30:23 +0000 (19:30 +0200)
src/eap_server/eap_fast.c
src/eap_server/eap_gpsk.c

index a97a41b..b091441 100644 (file)
@@ -1030,20 +1030,21 @@ static void eap_fast_process_phase2_eap(struct eap_sm *sm,
        hdr = (struct eap_hdr *) in_data;
        if (in_len < (int) sizeof(*hdr)) {
                wpa_printf(MSG_INFO, "EAP-FAST: Too short Phase 2 "
-                          "EAP frame (len=%d)", in_len);
+                          "EAP frame (len=%lu)", (unsigned long) in_len);
                eap_fast_req_failure(sm, data);
                return;
        }
        len = be_to_host16(hdr->length);
        if (len > in_len) {
                wpa_printf(MSG_INFO, "EAP-FAST: Length mismatch in "
-                          "Phase 2 EAP frame (len=%d hdr->length=%d)",
-                          in_len, len);
+                          "Phase 2 EAP frame (len=%lu hdr->length=%lu)",
+                          (unsigned long) in_len, (unsigned long) len);
                eap_fast_req_failure(sm, data);
                return;
        }
        wpa_printf(MSG_DEBUG, "EAP-FAST: Received Phase 2: code=%d "
-                  "identifier=%d length=%d", hdr->code, hdr->identifier, len);
+                  "identifier=%d length=%lu", hdr->code, hdr->identifier,
+                  (unsigned long) len);
        switch (hdr->code) {
        case EAP_CODE_RESPONSE:
                eap_fast_process_phase2_response(sm, data, (u8 *) hdr, len);
index 09c6f07..c87d452 100644 (file)
@@ -433,7 +433,9 @@ static void eap_gpsk_process_gpsk_2(struct eap_sm *sm,
        miclen = eap_gpsk_mic_len(data->vendor, data->specifier);
        if (end - pos < (int) miclen) {
                wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC "
-                          "(left=%d miclen=%d)", end - pos, miclen);
+                          "(left=%lu miclen=%lu)",
+                          (unsigned long) (end - pos),
+                          (unsigned long) miclen);
                eap_gpsk_state(data, FAILURE);
                return;
        }
@@ -454,8 +456,9 @@ static void eap_gpsk_process_gpsk_2(struct eap_sm *sm,
        pos += miclen;
 
        if (pos != end) {
-               wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %d bytes of extra "
-                          "data in the end of GPSK-2", end - pos);
+               wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %lu bytes of extra "
+                          "data in the end of GPSK-2",
+                          (unsigned long) (end - pos));
        }
 
        eap_gpsk_state(data, GPSK_3);
@@ -499,7 +502,9 @@ static void eap_gpsk_process_gpsk_4(struct eap_sm *sm,
        miclen = eap_gpsk_mic_len(data->vendor, data->specifier);
        if (end - pos < (int) miclen) {
                wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC "
-                          "(left=%d miclen=%d)", end - pos, miclen);
+                          "(left=%lu miclen=%lu)",
+                          (unsigned long) (end - pos),
+                          (unsigned long) miclen);
                eap_gpsk_state(data, FAILURE);
                return;
        }
@@ -520,8 +525,9 @@ static void eap_gpsk_process_gpsk_4(struct eap_sm *sm,
        pos += miclen;
 
        if (pos != end) {
-               wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %d bytes of extra "
-                          "data in the end of GPSK-4", end - pos);
+               wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %lu bytes of extra "
+                          "data in the end of GPSK-4",
+                          (unsigned long) (end - pos));
        }
 
        eap_gpsk_state(data, SUCCESS);