From aa34afc3f7050879906a183991b87667003da780 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 12 Nov 2022 09:07:46 +0100 Subject: [PATCH] cleanup: remove ARRAY_SIZE macro from header It is only used in a single source file, so no point having it in a (non-generic) header. Signed-off-by: Berthold Stoeger --- core/git-access.h | 2 -- core/load-git.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/git-access.h b/core/git-access.h index 54b15dd2c..5c18b218d 100644 --- a/core/git-access.h +++ b/core/git-access.h @@ -18,8 +18,6 @@ extern "C" { #define CLOUD_HOST_PATTERN "ssrf-cloud-..\\.subsurface-divelog\\.org" #define CLOUD_HOST_GENERIC "cloud.subsurface-divelog.org" -#define ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0])) - enum remote_transport { RT_LOCAL, RT_HTTPS, RT_SSH, RT_OTHER }; struct git_oid; diff --git a/core/load-git.c b/core/load-git.c index 224baa1b0..47c769b7d 100644 --- a/core/load-git.c +++ b/core/load-git.c @@ -30,6 +30,8 @@ #include "tag.h" #include "subsurface-time.h" +#define ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0])) + const char *saved_git_id = NULL; struct git_parser_state {