fix: is_port_opened
This commit is contained in:
@ -41,13 +41,10 @@ void print_config(const struct scan *general, const char *hosts_path,
|
|||||||
|
|
||||||
bool is_port_opened(const e_state states[6], uint8_t type)
|
bool is_port_opened(const e_state states[6], uint8_t type)
|
||||||
{
|
{
|
||||||
if (type == SCAN_ALL) {
|
|
||||||
for (uint8_t i = 0; i < NB_SCAN; i++)
|
for (uint8_t i = 0; i < NB_SCAN; i++)
|
||||||
if (states[i] == OPENED)
|
if (states[i] == OPENED)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
return states[type] == OPENED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_port_state(uint16_t port, uint8_t type,
|
static void print_port_state(uint16_t port, uint8_t type,
|
||||||
|
Reference in New Issue
Block a user