mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 16:54:04 -05:00
FST: Remove duplicated dl_list_empty() check befor dl_list_first()
dl_list_first() takes care of this already, so there is no need to do a separate check here. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
73664e0985
commit
a55ebeac26
@ -134,18 +134,16 @@ int fst_global_init(void)
|
|||||||
void fst_global_deinit(void)
|
void fst_global_deinit(void)
|
||||||
{
|
{
|
||||||
struct fst_group *group;
|
struct fst_group *group;
|
||||||
|
struct fst_ctrl_handle *h;
|
||||||
|
|
||||||
fst_session_global_deinit();
|
fst_session_global_deinit();
|
||||||
while ((group = fst_first_group()) != NULL)
|
while ((group = fst_first_group()) != NULL)
|
||||||
fst_group_delete(group);
|
fst_group_delete(group);
|
||||||
while (!dl_list_empty(&fst_global_ctrls_list)) {
|
while ((h = dl_list_first(&fst_global_ctrls_list,
|
||||||
struct fst_ctrl_handle *h;
|
struct fst_ctrl_handle,
|
||||||
|
global_ctrls_lentry)))
|
||||||
h = dl_list_first(&fst_global_ctrls_list,
|
|
||||||
struct fst_ctrl_handle, global_ctrls_lentry);
|
|
||||||
fst_global_del_ctrl(h);
|
fst_global_del_ctrl(h);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct fst_ctrl_handle * fst_global_add_ctrl(const struct fst_ctrl *ctrl)
|
struct fst_ctrl_handle * fst_global_add_ctrl(const struct fst_ctrl *ctrl)
|
||||||
|
@ -36,8 +36,6 @@ static inline Boolean fst_group_has_ifaces(struct fst_group *g)
|
|||||||
|
|
||||||
static inline struct fst_iface * fst_group_first_iface(struct fst_group *g)
|
static inline struct fst_iface * fst_group_first_iface(struct fst_group *g)
|
||||||
{
|
{
|
||||||
if (dl_list_empty(&g->ifaces))
|
|
||||||
return NULL;
|
|
||||||
return dl_list_first(&g->ifaces, struct fst_iface, group_lentry);
|
return dl_list_first(&g->ifaces, struct fst_iface, group_lentry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,8 +68,6 @@ extern struct dl_list fst_global_groups_list;
|
|||||||
|
|
||||||
static inline struct fst_group * fst_first_group(void)
|
static inline struct fst_group * fst_first_group(void)
|
||||||
{
|
{
|
||||||
if (dl_list_empty(&fst_global_groups_list))
|
|
||||||
return NULL;
|
|
||||||
return dl_list_first(&fst_global_groups_list, struct fst_group,
|
return dl_list_first(&fst_global_groups_list, struct fst_group,
|
||||||
global_groups_lentry);
|
global_groups_lentry);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user