summaryrefslogtreecommitdiff
path: root/src/mod_webdav.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_webdav.c')
-rw-r--r--src/mod_webdav.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mod_webdav.c b/src/mod_webdav.c
index 77b6a5dc..095c2e7d 100644
--- a/src/mod_webdav.c
+++ b/src/mod_webdav.c
@@ -155,7 +155,7 @@
*/
-/* linkat() fstatat() unlinkat() fdopendir() NAME_MAX */
+/* linkat() fstatat() unlinkat() fdopendir() */
#if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE-0 < 700
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700
@@ -176,11 +176,11 @@
#endif
#include "first.h" /* first */
+#include "sys-dirent.h"
#include "sys-mmap.h"
#include <sys/types.h>
#include "sys-stat.h"
#include "sys-time.h"
-#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h> /* rename() */
@@ -233,14 +233,6 @@ typedef off_t loff_t;
#define linkat(odfd,opath,ndfd,npath,flags) -1
#endif
-#ifndef _D_EXACT_NAMLEN
-#ifdef _DIRENT_HAVE_D_NAMLEN
-#define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
-#else
-#define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
-#endif
-#endif
-
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
@@ -2518,7 +2510,7 @@ webdav_delete_dir (const plugin_config * const pconf,
* so be sure to restore to base each loop iter */
const uint32_t dst_path_used = dst->path.used;
const uint32_t dst_rel_path_used = dst->rel_path.used;
- int s_isdir;
+ int s_isdir = 0;
struct dirent *de;
while (NULL != (de = readdir(dir))) {
if (de->d_name[0] == '.'
@@ -3219,7 +3211,7 @@ webdav_copymove_dir (const plugin_config * const pconf,
webdav_xml_response_status(r, &src->rel_path, 403);
return 403; /* Forbidden */
}
- mode_t d_type;
+ mode_t d_type = 0;
int multi_status = 0;
struct dirent *de;
while (NULL != (de = readdir(srcdir))) {