]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
append_file() should return void as it doesn't return anything and we don't check...
authorOndřej Surý <ondrej@isc.org>
Wed, 8 Apr 2020 13:46:33 +0000 (15:46 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 15 Apr 2020 10:45:05 +0000 (12:45 +0200)
lib/isc/glob.c

index 3eb2a7ed46fc0a14843ab0bd753c4b6d8bb122c7..559815525b354f6bcae505d5ebaa7edfcd7e1dac 100644 (file)
 
 #if HAVE_GLOB_H
 #include <glob.h>
-#elif defined(_WIN32) || defined(_WIN64)
+#elif defined(_WIN32)
 #include <stdlib.h>
 #define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>
 
 #include <isc/list.h>
-#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) */