Fix whitespace and move ok assignment
This commit is contained in:
parent
5001912221
commit
742ac14b21
|
@ -100,7 +100,7 @@ abort:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_airtime(struct airtime_result *result, int ifx) {
|
bool get_airtime(struct airtime_result *result, int ifx) {
|
||||||
bool ok = true;
|
bool ok;
|
||||||
int ctrl;
|
int ctrl;
|
||||||
struct nl_sock *sk = NULL;
|
struct nl_sock *sk = NULL;
|
||||||
struct nl_msg *msg = NULL;
|
struct nl_msg *msg = NULL;
|
||||||
|
@ -123,6 +123,8 @@ bool get_airtime(struct airtime_result *result, int ifx) {
|
||||||
|
|
||||||
#undef CHECK
|
#undef CHECK
|
||||||
|
|
||||||
|
ok = true;
|
||||||
|
|
||||||
nla_put_failure:
|
nla_put_failure:
|
||||||
out:
|
out:
|
||||||
if (msg)
|
if (msg)
|
||||||
|
|
|
@ -10,7 +10,7 @@ static void fill_airtime_json(struct airtime_result *air, struct json_object *wi
|
||||||
struct json_object *obj;
|
struct json_object *obj;
|
||||||
|
|
||||||
obj = json_object_new_object();
|
obj = json_object_new_object();
|
||||||
if(!obj)
|
if (!obj)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
json_object_object_add(obj, "frequency", json_object_new_int(air->frequency));
|
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();
|
ifaces = get_ifaces();
|
||||||
while (ifaces != NULL) {
|
while (ifaces != NULL) {
|
||||||
if(get_airtime(&airtime, ifaces->ifx))
|
if (get_airtime(&airtime, ifaces->ifx))
|
||||||
fill_airtime_json(&airtime, wireless);
|
fill_airtime_json(&airtime, wireless);
|
||||||
|
|
||||||
void *freeptr = ifaces;
|
void *freeptr = ifaces;
|
||||||
|
|
Loading…
Reference in New Issue