eap: fix uninitialized variable error
James Prestwood
PATCH 1/1 eap: fix uninitialized variable error
src/eap.c: In function ‘eap_rx_packet’:src/eap.c:417:57: error: ‘vendor_type’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
417 | (type == EAP_TYPE_EXPANDED && vendor_id == (id) && vendor_type == (t))
--- src/eap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/eap.c +1 -1
@@ -424,7 +424,7 @@ static void eap_handle_response(struct eap_state *eap, const uint8_t *pkt, {enum eap_type type;uint32_t vendor_id; -uint32_t vendor_type; +uint32_t vendor_type =0 ;enum eap_type our_type = eap->method->request_type;uint32_t our_vendor_id = (eap->method->vendor_id[0 ] <<16 ) | (eap->method->vendor_id[1] << 8) |
Signature · 1 line
2.31.1