fix: is_port_opened

This commit is contained in:
2025-07-02 08:26:58 -05:00
parent e09c9711ed
commit 65116f38d1

View File

@ -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,