diff --git a/src/pixiewps.c b/src/pixiewps.c index c990f23..0512521 100644 --- a/src/pixiewps.c +++ b/src/pixiewps.c @@ -776,7 +776,7 @@ usage_err: } uint_fast8_t pfound = PIN_ERROR; - vtag_t *vtag; + struct ie_vtag *vtag; if (decrypted5 && decrypted7 && wps->e_hash1 && wps->e_hash2) { wps->e_s1 = malloc(WPS_SECRET_NONCE_LEN); if (!wps->e_s1) goto memory_err; wps->e_s2 = malloc(WPS_SECRET_NONCE_LEN); if (!wps->e_s2) goto memory_err; diff --git a/src/wps.h b/src/wps.h index 7fb0283..f0c5213 100644 --- a/src/wps.h +++ b/src/wps.h @@ -57,13 +57,12 @@ struct ie_vtag { #define WPS_TAG_KEYWRAP_AUTH_LEN 8 uint8_t data[]; }; -typedef struct ie_vtag vtag_t; -#define VTAG_SIZE (sizeof(vtag_t)) +#define VTAG_SIZE (sizeof(struct ie_vtag)) -vtag_t *find_vtag(void *vtagp, int vtagl, void *vidp, int vlen) +struct ie_vtag *find_vtag(void *vtagp, int vtagl, void *vidp, int vlen) { uint8_t *vid = vidp; - vtag_t *vtag = vtagp; + struct ie_vtag *vtag = vtagp; while (0 < vtagl) { const int len = end_ntoh16(vtag->len); if (vid && memcmp(vid, &vtag->id, 2) != 0) @@ -73,7 +72,7 @@ vtag_t *find_vtag(void *vtagp, int vtagl, void *vidp, int vlen) next_vtag: vtagl -= len + VTAG_SIZE; - vtag = (vtag_t *)((uint8_t *)vtag + len + VTAG_SIZE); + vtag = (struct ie_vtag *)((uint8_t *)vtag + len + VTAG_SIZE); } return NULL; }