changeset 1576:0c8c2552b2f2

merge
author Matt Johnston <matt@ucc.asn.au>
date Sat, 03 Mar 2018 11:11:04 +0800
parents b66fc351f7e8 (current diff) e75dab5bec71 (diff)
children 399d8eb961b5
files
diffstat 4 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dbhelpers.c	Sat Mar 03 11:08:26 2018 +0800
+++ b/dbhelpers.c	Sat Mar 03 11:11:04 2018 +0800
@@ -9,8 +9,9 @@
 #elif defined(HAVE_EXPLICIT_BZERO)
 	explicit_bzero(data, len);
 #else
+	/* This must be volatile to avoid compiler optimisation */
 	volatile void *p = data;
-    memset((void*)p, 0x0, len);
+	memset((void*)p, 0x0, len);
 #endif
 }
 
--- a/dbutil.c	Sat Mar 03 11:08:26 2018 +0800
+++ b/dbutil.c	Sat Mar 03 11:11:04 2018 +0800
@@ -687,6 +687,6 @@
 		TRACE(("error opening directory %s for fsync: %s", dir, strerror(errno)))
 	}
 
-	free(fn_dir);
+	m_free(fn_dir);
 #endif
 }
--- a/fuzz-wrapfd.c	Sat Mar 03 11:08:26 2018 +0800
+++ b/fuzz-wrapfd.c	Sat Mar 03 11:11:04 2018 +0800
@@ -26,7 +26,7 @@
 static unsigned int nused;
 static unsigned short rand_state[3];
 
-void wrapfd_setup() {
+void wrapfd_setup(void) {
 	TRACE(("wrapfd_setup"))
 	nused = 0;
 	memset(wrap_fds, 0x0, sizeof(wrap_fds));
--- a/fuzz-wrapfd.h	Sat Mar 03 11:08:26 2018 +0800
+++ b/fuzz-wrapfd.h	Sat Mar 03 11:11:04 2018 +0800
@@ -7,10 +7,10 @@
     UNUSED = 0,
     PLAIN,
     INPROGRESS,
-    RANDOMIN,
+    RANDOMIN
 };
 
-void wrapfd_setup();
+void wrapfd_setup(void);
 void wrapfd_setseed(uint32_t seed);
 // doesn't take ownership of buf. buf is optional.
 void wrapfd_add(int fd, buffer *buf, enum wrapfd_mode mode);