From 176bea08417a3ad89848491a357f73591045ed3c Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Wed, 1 May 2024 07:58:41 +0530 Subject: c/format: properly handle `ForEachMacros` --- .clang-format | 3 +++ src/npassd/service.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index e4b15e9..5046235 100644 --- a/.clang-format +++ b/.clang-format @@ -9,3 +9,6 @@ ContinuationIndentWidth: 8 IndentWidth: 8 TabWidth: 8 UseTab: Always + +ForEachMacros: + - 'LIST_FOREACH' diff --git a/src/npassd/service.c b/src/npassd/service.c index 8fa1b19..f69ac22 100644 --- a/src/npassd/service.c +++ b/src/npassd/service.c @@ -152,10 +152,10 @@ void service_free(struct service *service) struct session *s; struct collection *c; - LIST_FOREACH(s, &service->sessions, dlist) - session_free(s); - LIST_FOREACH(c, &service->collections, dlist) - collection_free(c); + LIST_FOREACH (s, &service->sessions, dlist) + session_free(s); + LIST_FOREACH (c, &service->collections, dlist) + collection_free(c); sd_bus_slot_unref(service->slot); } -- cgit v1.2.3