Fix assignment of `ok`

This commit is contained in:
Julian Kornberger 2016-12-22 23:32:45 +01:00
parent 742ac14b21
commit 0a838b0cda
1 changed files with 2 additions and 2 deletions

View File

@ -100,13 +100,13 @@ abort:
}
bool get_airtime(struct airtime_result *result, int ifx) {
bool ok;
bool ok = false;
int ctrl;
struct nl_sock *sk = NULL;
struct nl_msg *msg = NULL;
#define CHECK(x) { if (!(x)) { fprintf(stderr, "%s: error on line %d\n", __FILE__, __LINE__); ok = false; goto out; } }
#define CHECK(x) { if (!(x)) { fprintf(stderr, "%s: error on line %d\n", __FILE__, __LINE__); goto out; } }
CHECK(sk = nl_socket_alloc());
CHECK(genl_connect(sk) >= 0);