From 0a838b0cda658f38626630394ba2889754edb6ee Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Thu, 22 Dec 2016 23:32:45 +0100 Subject: [PATCH] Fix assignment of `ok` --- net/respondd-module-airtime/src/airtime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/respondd-module-airtime/src/airtime.c b/net/respondd-module-airtime/src/airtime.c index f808ddb..d6d071c 100644 --- a/net/respondd-module-airtime/src/airtime.c +++ b/net/respondd-module-airtime/src/airtime.c @@ -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);