From 904cbea78fb91438eafc867ccd8a9f9ab66eb5ec Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 21 Dec 2020 19:55:06 -0800 Subject: [clang-tidy] Avoid global non-const variables Found with cppcoreguidelines-avoid-non-const-global-variables Signed-off-by: Rosen Penev --- src/plist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plist.c') diff --git a/src/plist.c b/src/plist.c index 4cb6206..862a54c 100644 --- a/src/plist.c +++ b/src/plist.c @@ -69,8 +69,8 @@ typedef volatile struct { int state; } thread_once_t; -static thread_once_t init_once = {0, 0}; -static thread_once_t deinit_once = {0, 0}; +static const thread_once_t init_once = {0, 0}; +static const thread_once_t deinit_once = {0, 0}; void thread_once(thread_once_t *once_control, void (*init_routine)(void)) { -- cgit v1.1-32-gdbae