Fix whitespace and move ok assignment

This commit is contained in:
Julian Kornberger 2016-12-22 23:15:13 +01:00
parent 5001912221
commit 742ac14b21
2 changed files with 5 additions and 3 deletions

View File

@ -100,7 +100,7 @@ abort:
}
bool get_airtime(struct airtime_result *result, int ifx) {
bool ok = true;
bool ok;
int ctrl;
struct nl_sock *sk = NULL;
struct nl_msg *msg = NULL;
@ -123,6 +123,8 @@ bool get_airtime(struct airtime_result *result, int ifx) {
#undef CHECK
ok = true;
nla_put_failure:
out:
if (msg)

View File

@ -10,7 +10,7 @@ static void fill_airtime_json(struct airtime_result *air, struct json_object *wi
struct json_object *obj;
obj = json_object_new_object();
if(!obj)
if (!obj)
return;
json_object_object_add(obj, "frequency", json_object_new_int(air->frequency));
@ -40,7 +40,7 @@ static struct json_object *respondd_provider_statistics(void) {
ifaces = get_ifaces();
while (ifaces != NULL) {
if(get_airtime(&airtime, ifaces->ifx))
if (get_airtime(&airtime, ifaces->ifx))
fill_airtime_json(&airtime, wireless);
void *freeptr = ifaces;