Skip to content

Commit

Permalink
some linting after fuzz merge (#60)
Browse files Browse the repository at this point in the history
* fix prototype

* remove extra comma

* use m_free after m_strdup
  • Loading branch information
fperrad authored and mkj committed Mar 3, 2018
1 parent ce1f9cd commit 257bba0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dbhelpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ void m_burn(void *data, unsigned int len) {
#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
}

Expand Down
2 changes: 1 addition & 1 deletion dbutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,6 @@ void fsync_parent_dir(const char* fn) {
TRACE(("error opening directory %s for fsync: %s", dir, strerror(errno)))
}

free(fn_dir);
m_free(fn_dir);
#endif
}
2 changes: 1 addition & 1 deletion fuzz-wrapfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static int wrap_used[IOWRAP_MAXFD+1];
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));
Expand Down
4 changes: 2 additions & 2 deletions fuzz-wrapfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ enum wrapfd_mode {
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);
Expand Down

0 comments on commit 257bba0

Please sign in to comment.