X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fconnection.c;h=598b5e591d348c2a662e93f8841288f849290cc1;hb=f62b4a91344bd0de09e7fb4e4c8c1993ffc027c3;hp=cbe704b537e24c246df59a5af43bd3f3e05456a1;hpb=0b8b23e0dd7219344543f135ca0aeba8a4a42d48;p=meshlink diff --git a/src/connection.c b/src/connection.c index cbe704b5..598b5e59 100644 --- a/src/connection.c +++ b/src/connection.c @@ -91,12 +91,7 @@ void connection_add(connection_t *c) { } void connection_del(connection_t *c) { - for list_each(connection_t, c, connection_list) { - if(node->data == c) { - list_delete_node(connection_list, node); - return; - } - } + list_delete(connection_list, c); } bool dump_connections(connection_t *cdump) {