Skip to content

Commit

Permalink
Use _mm_free for memory allocated by _mm_alloc. Bug 703. Minor compil…
Browse files Browse the repository at this point in the history
…er warning fixes.
  • Loading branch information
victorjulien committed Jan 8, 2013
1 parent 34d063a commit 0c84a7a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app-layer-dcerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ void hexdump(/*Flow *f,*/ const void *buf, size_t len) {
if (n%16 == 1) {
/* store address for this line */
#if __WORDSIZE == 64
snprintf(addrstr, sizeof(addrstr), "%.4lx",
snprintf(addrstr, sizeof(addrstr), "%.4"PRIx64,
((uint64_t)p-(uint64_t)buf) );
#else
snprintf(addrstr, sizeof(addrstr), "%.4x",
snprintf(addrstr, sizeof(addrstr), "%.4"PRIx32,
((uint32_t)p-(uint32_t)buf) );
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/detect-engine-payload.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static int PayloadTestSig13(void)
tv_diff.tv_sec = tv_end.tv_sec - tv_start.tv_sec;
tv_diff.tv_usec = tv_end.tv_usec - tv_start.tv_usec;

printf("%ld.%06ld\n", tv_diff.tv_sec, tv_diff.tv_usec);
printf("%ld.%06ld\n", tv_diff.tv_sec, (long int)tv_diff.tv_usec);

result = 1;

Expand Down
2 changes: 1 addition & 1 deletion src/log-tlslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static int CreateFileName(LogTlsFileCtx *log, Packet *p, SSLState *state, char *
snprintf(filename, filenamelen, "%s/%ld.%ld-%d.pem",
tls_logfile_base_dir,
p->ts.tv_sec,
p->ts.tv_usec,
(long int)p->ts.tv_usec,
file_id);
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/util-mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ SC_ATOMIC_EXTERN(unsigned int, engine_stage);
* _mm_free.
*/
#define SCFreeAligned(a) ({ \
free((a)); \
_mm_free((a)); \
})

#endif /* __WIN32 */
Expand Down

0 comments on commit 0c84a7a

Please sign in to comment.