Format fixes - ubus.c

This commit is contained in:
Simon Kelley
2018-07-29 22:15:36 +01:00
parent 9d6fd1727e
commit 6f835ed6c8

View File

@@ -51,7 +51,8 @@ void set_ubus_listeners()
void check_ubus_listeners()
{
if (!ubus) {
if (!ubus)
{
ubus = ubus_connect(NULL);
if (!ubus)
return;
@@ -61,7 +62,8 @@ void check_ubus_listeners()
if (poll_check(ubus->sock.fd, POLLIN))
ubus_handle_event(ubus);
if (poll_check(ubus->sock.fd, POLLHUP)) {
if (poll_check(ubus->sock.fd, POLLHUP))
{
ubus_free(ubus);
ubus = NULL;
}
@@ -74,9 +76,8 @@ static int ubus_handle_metrics(struct ubus_context *ctx, struct ubus_object *obj
{
blob_buf_init(&b, 0);
for(int i=0; i < __METRIC_MAX; i++) {
for(int i=0; i < __METRIC_MAX; i++)
blobmsg_add_u32(&b, get_metric_name(i), daemon->metrics[i]);
}
ubus_send_reply(ctx, req, b.head);