From 6e6dcbc7e77fbc4f7873b6e40c911b7038a6a648 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20K=C3=BCthe?= Date: Tue, 12 Dec 2023 15:06:17 +0000 Subject: [PATCH] Correct a type mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In one place in the source code, the debug level of type `int` was used and in other places of type `debug_t`. This commit introduces a change so that the type `debug_t` is used in both places. This also resolves a compiler warning. Signed-off-by: Marek Küthe --- src/info.c | 2 +- src/tincctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index 25e6b60c..69d29c12 100644 --- a/src/info.c +++ b/src/info.c @@ -26,7 +26,7 @@ #include "tincctl.h" #include "utils.h" -void logger(int level, int priority, const char *format, ...) { +void logger(debug_t level, int priority, const char *format, ...) { (void)level; (void)priority; va_list ap; diff --git a/src/tincctl.c b/src/tincctl.c index 3b7efd4e..3af0f1f8 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -80,7 +80,7 @@ char *scriptextension = defaultextension; static char *prompt; char *device = NULL; char *iface = NULL; -int debug_level = -1; +debug_t debug_level = -1; typedef enum option_t { OPT_BAD_OPTION = '?', -- 2.20.1