arp_min_close_fd() and arp_close_fd() can return void.
This commit is contained in:
parent
1c30247c36
commit
6b1d422d6f
@ -178,15 +178,14 @@ static int arp_open_fd(struct client_state_t *cs)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int arp_min_close_fd(struct client_state_t *cs)
|
static void arp_min_close_fd(struct client_state_t *cs)
|
||||||
{
|
{
|
||||||
if (cs->arpFd == -1)
|
if (cs->arpFd == -1)
|
||||||
return 0;
|
return;
|
||||||
epoll_del(cs->epollFd, cs->arpFd);
|
epoll_del(cs->epollFd, cs->arpFd);
|
||||||
close(cs->arpFd);
|
close(cs->arpFd);
|
||||||
cs->arpFd = -1;
|
cs->arpFd = -1;
|
||||||
arpState = AS_NONE;
|
arpState = AS_NONE;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arp_switch_state(struct client_state_t *cs, arp_state_t state)
|
static void arp_switch_state(struct client_state_t *cs, arp_state_t state)
|
||||||
@ -209,12 +208,11 @@ static void arp_switch_state(struct client_state_t *cs, arp_state_t state)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int arp_close_fd(struct client_state_t *cs)
|
void arp_close_fd(struct client_state_t *cs)
|
||||||
{
|
{
|
||||||
arp_min_close_fd(cs);
|
arp_min_close_fd(cs);
|
||||||
for (int i = 0; i < AS_MAX; ++i)
|
for (int i = 0; i < AS_MAX; ++i)
|
||||||
arp_wake_ts[i] = -1;
|
arp_wake_ts[i] = -1;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arp_reopen_fd(struct client_state_t *cs)
|
static void arp_reopen_fd(struct client_state_t *cs)
|
||||||
|
@ -59,7 +59,7 @@ extern int arp_probe_max;
|
|||||||
extern int arp_relentless_def;
|
extern int arp_relentless_def;
|
||||||
|
|
||||||
void arp_reset_send_stats(void);
|
void arp_reset_send_stats(void);
|
||||||
int arp_close_fd(struct client_state_t *cs);
|
void arp_close_fd(struct client_state_t *cs);
|
||||||
int arp_check(struct client_state_t *cs, struct dhcpmsg *packet);
|
int arp_check(struct client_state_t *cs, struct dhcpmsg *packet);
|
||||||
int arp_gw_check(struct client_state_t *cs);
|
int arp_gw_check(struct client_state_t *cs);
|
||||||
void arp_set_defense_mode(struct client_state_t *cs);
|
void arp_set_defense_mode(struct client_state_t *cs);
|
||||||
|
Loading…
Reference in New Issue
Block a user