Signed-off-by: Marc-Antoine Perennou --- src/eap.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/eap.c b/src/eap.c index 0645be47..53e35b5e 100644 --- a/src/eap.c +++ b/src/eap.c @@ -416,6 +416,8 @@ static const char *eap_type_to_str(enum eap_type type, uint32_t vendor_id, #define IS_EXPANDED_RESPONSE(id, t) \ (type == EAP_TYPE_EXPANDED && vendor_id == (id) && vendor_type == (t)) +#define response_is(wanted) ((type == wanted) || IS_EXPANDED_RESPONSE(0, wanted)) + static void eap_handle_response(struct eap_state *eap, const uint8_t *pkt, size_t len) { @@ -428,14 +430,6 @@ static void eap_handle_response(struct eap_state *eap, const uint8_t *pkt, eap->method->vendor_id[2]; uint32_t our_vendor_type = eap->method->vendor_type; - bool response_is(enum eap_type wanted) - { - if (type == wanted) - return true; - - return IS_EXPANDED_RESPONSE(0, wanted); - } - if (len < 1) /* Invalid packets to be ignored */ return; -- 2.30.0