From 6f3c201ff439a0433624d77445753331f2c64f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 8 Apr 2020 15:46:33 +0200 Subject: [PATCH] append_file() should return void as it doesn't return anything and we don't check for return value --- lib/isc/glob.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/isc/glob.c b/lib/isc/glob.c index 3eb2a7ed46..559815525b 100644 --- a/lib/isc/glob.c +++ b/lib/isc/glob.c @@ -22,16 +22,15 @@ #if HAVE_GLOB_H #include -#elif defined(_WIN32) || defined(_WIN64) +#elif defined(_WIN32) #include #define WIN32_LEAN_AND_MEAN 1 #include #include -#define GLOB_WIN_IMPL 1 -#define GLOB_ERR 0x0004 /* Return on error. */ -#define GLOB_NOSPACE (-1) -#define GLOB_NOMATCH (-3) +#define GLOB_ERR 0x0004 /* Return on error. */ +#define GLOB_NOSPACE (-1) +#define GLOB_NOMATCH (-3) /* custom glob implementation for windows */ static int @@ -73,7 +72,7 @@ isc_globfree(glob_t *pglob) { globfree(pglob); } -#ifdef GLOB_WIN_IMPL +#if defined(_WIN32) typedef struct file_path file_path_t; @@ -102,7 +101,7 @@ map_error(DWORD win_err_code) { /* add file in directory dir, that matches glob expression * provided in function glob(), to the linked list fl */ -static int +static void append_file(isc_mem_t *mctx, file_list_t *fl, const char *dir, const char *file, size_t full_path_len) { file_path_t *fp = isc_mem_get(mctx, sizeof(file_path_t)); @@ -242,4 +241,4 @@ globfree(glob_t *pglob) { pglob->mctx = NULL; } -#endif /* GLOB_WIN_IMPL */ +#endif /* defined(_WIN32) */