]> git.meshlink.io Git - meshlink/blobdiff - src/logger.c
C99 extravaganza.
[meshlink] / src / logger.c
index 5de88bdeb5a9321eb09bd3182904de80ec54f0a3..184ba35940c7eebdfd6c9577f3c676fea583fd2f 100644 (file)
@@ -140,9 +140,7 @@ void logger(int level, int priority, const char *format, ...) {
        if(logcontrol) {
                suppress = true;
                logcontrol = false;
-               for(list_node_t *node = connection_list->head, *next; node; node = next) {
-                       next = node->next;
-                       connection_t *c = node->data;
+               for list_each(connection_t, c, connection_list) {
                        if(!c->status.log)
                                continue;
                        logcontrol = true;