]> git.meshlink.io Git - meshlink/commitdiff
Remove some more superfluous parentheses.
authorGuus Sliepen <guus@meshlink.io>
Sun, 13 Oct 2019 12:24:03 +0000 (14:24 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 13 Oct 2019 12:24:03 +0000 (14:24 +0200)
src/devtools.c
src/event.c
src/meshlink.c

index fab0c72019325ad4e893207305c2fc71abf81e94..a4468f024794508ab199d08faba4590d5a4ecad1 100644 (file)
@@ -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;
                        }
 
index 90f56944fec9cc2a2251d2066630f736cccaac57..aed423ad9b3c29b691c379129aa8047f08692d9a 100644 (file)
@@ -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);
index 54187a59ed9673a63b166eab73b88b44dbce85bd..e82ea4f11a384f639f3c6298a42bfa15aecf3e8a 100644 (file)
@@ -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;
 }