Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit 03cd1dc

Browse files
committed
Prefer a pointer to an incomplete type to void *.
1 parent bc62eec commit 03cd1dc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/entity-validation.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#ifndef ENTITY_VALIDATION_H
66
#define ENTITY_VALIDATION_H
77

8-
typedef struct {
8+
struct entity_chanacs_validation_vtable {
99
chanacs_t *(*match_entity)(chanacs_t *ca, myentity_t *mt);
1010
chanacs_t *(*match_user)(chanacs_t *ca, user_t *mt);
1111

1212
bool (*can_register_channel)(myentity_t *mt);
13-
} entity_chanacs_validation_vtable_t;
13+
};
1414

1515
E entity_chanacs_validation_vtable_t *myentity_get_chanacs_validator(myentity_t *mt);
1616

include/entity.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ typedef enum {
1212
ENT_EXTTARGET,
1313
} myentity_type_t;
1414

15+
typedef struct entity_chanacs_validation_vtable entity_chanacs_validation_vtable_t;
16+
1517
typedef struct {
1618
object_t parent;
1719
myentity_type_t type;
1820
char *name;
1921
char id[IDLEN];
2022

2123
mowgli_list_t chanacs;
22-
void *chanacs_validate; /* vtable for validating chanacs entries */
24+
entity_chanacs_validation_vtable_t *chanacs_validate;
2325
} myentity_t;
2426

2527
#define entity(x) ((myentity_t *)(x))

0 commit comments

Comments
 (0)