]> git.meshlink.io Git - meshlink/blobdiff - src/connection.c
Fix deleting connections from the connection list.
[meshlink] / src / connection.c
index cbe704b537e24c246df59a5af43bd3f3e05456a1..598b5e591d348c2a662e93f8841288f849290cc1 100644 (file)
@@ -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) {