diff options
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -603,7 +603,7 @@ static int og_cmd_wol(json_t *element, struct og_msg_params *params) if (og_client_find(new_params.ips_array[i])) continue; - if (inet_aton(new_params.ips_array[i], &addr) < 0) + if (!inet_aton(new_params.ips_array[i], &addr)) continue; cli_wol = og_client_wol_find(&addr); @@ -618,7 +618,7 @@ static int og_cmd_wol(json_t *element, struct og_msg_params *params) list_add_tail(&cli_wol->list, &client_wol_list); - if (inet_aton(new_params.netmask_array[i], &netmask) < 0) + if (!inet_aton(new_params.netmask_array[i], &netmask)) continue; if (wake_up(sd, &addr, &netmask, new_params.mac_array[i], @@ -2011,7 +2011,7 @@ static int og_cmd_get_client_info(json_t *element, if (!og_msg_params_validate(params, OG_REST_PARAM_ADDR)) return -1; - if (inet_aton(params->ips_array[0], &addr) == 0) + if (!inet_aton(params->ips_array[0], &addr)) return -1; dbi = og_dbi_open(&ogconfig.db); |