Removed typedef with _t suffix

*_t naming convention is reserved for POSIX types
This commit is contained in:
wiire-a 2017-12-31 10:34:53 +01:00
parent 07392b96fd
commit 2fd91f919c
2 changed files with 5 additions and 6 deletions

View File

@ -776,7 +776,7 @@ usage_err:
} }
uint_fast8_t pfound = PIN_ERROR; uint_fast8_t pfound = PIN_ERROR;
vtag_t *vtag; struct ie_vtag *vtag;
if (decrypted5 && decrypted7 && wps->e_hash1 && wps->e_hash2) { 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_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; wps->e_s2 = malloc(WPS_SECRET_NONCE_LEN); if (!wps->e_s2) goto memory_err;

View File

@ -57,13 +57,12 @@ struct ie_vtag {
#define WPS_TAG_KEYWRAP_AUTH_LEN 8 #define WPS_TAG_KEYWRAP_AUTH_LEN 8
uint8_t data[]; uint8_t data[];
}; };
typedef struct ie_vtag vtag_t; #define VTAG_SIZE (sizeof(struct ie_vtag))
#define VTAG_SIZE (sizeof(vtag_t))
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; uint8_t *vid = vidp;
vtag_t *vtag = vtagp; struct ie_vtag *vtag = vtagp;
while (0 < vtagl) { while (0 < vtagl) {
const int len = end_ntoh16(vtag->len); const int len = end_ntoh16(vtag->len);
if (vid && memcmp(vid, &vtag->id, 2) != 0) 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: next_vtag:
vtagl -= len + VTAG_SIZE; 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; return NULL;
} }