From: Guus Sliepen Date: Sun, 13 Oct 2019 12:24:03 +0000 (+0200) Subject: Remove some more superfluous parentheses. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=03ab29c1e6e1b608311decb6630eb0a2177ce1dd;p=meshlink Remove some more superfluous parentheses. --- diff --git a/src/devtools.c b/src/devtools.c index fab0c720..a4468f02 100644 --- a/src/devtools.c +++ b/src/devtools.c @@ -72,7 +72,7 @@ devtool_edge_t *devtool_get_all_edges(meshlink_handle_t *mesh, devtool_edge_t *e for splay_each(edge_t, e, mesh->edges) { // skip edges that do not represent a two-directional connection - if((!e->reverse) || (e->reverse->to != e->from)) { + if(!e->reverse || e->reverse->to != e->from) { continue; } diff --git a/src/event.c b/src/event.c index 90f56944..aed423ad 100644 --- a/src/event.c +++ b/src/event.c @@ -164,9 +164,9 @@ static void signalio_handler(event_loop_t *loop, void *data, int flags) { return; } - signal_t *sig = splay_search(&loop->signals, &((signal_t) { + signal_t *sig = splay_search(&loop->signals, &(signal_t) { .signum = signum - })); + }); if(sig) { sig->cb(loop, sig->data); diff --git a/src/meshlink.c b/src/meshlink.c index 54187a59..e82ea4f1 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -666,7 +666,7 @@ static bool finalize_join(meshlink_handle_t *mesh, const void *buf, uint16_t len return false; } - sptps_send_record(&(mesh->sptps), 1, ecdsa_get_public_key(mesh->private_key), 32); + sptps_send_record(&mesh->sptps, 1, ecdsa_get_public_key(mesh->private_key), 32); logger(mesh, MESHLINK_DEBUG, "Configuration stored in: %s\n", mesh->confbase); @@ -699,7 +699,7 @@ static bool invitation_receive(void *handle, uint8_t type, const void *msg, uint switch(type) { case SPTPS_HANDSHAKE: - return sptps_send_record(&(mesh->sptps), 0, mesh->cookie, sizeof(mesh)->cookie); + return sptps_send_record(&mesh->sptps, 0, mesh->cookie, sizeof(mesh)->cookie); case 0: return finalize_join(mesh, msg, len); @@ -1783,7 +1783,7 @@ bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const } // Notify event loop - signal_trigger(&(mesh->loop), &(mesh->datafromapp)); + signal_trigger(&mesh->loop, &mesh->datafromapp); return true; }