code cleanups (from cppcheck)

This commit is contained in:
hexcoder-
2021-01-04 15:14:20 +01:00
parent c423aebb1a
commit 33a7d6f168
11 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,4 @@
#define __GNU_SOURCE
#define _GNU_SOURCE
#include <dlfcn.h>
#include <unistd.h>
#include <stdio.h>

View File

@ -1,10 +1,10 @@
all:
afl-clang-fast -o persistent_demo persistent_demo.c
afl-clang-fast -o persistent_demo_new persistent_demo_new.c
AFL_DONT_OPTIMIZE=1 afl-clang-fast -o test-instr test-instr.c
../../afl-clang-fast -o persistent_demo persistent_demo.c
../../afl-clang-fast -o persistent_demo_new persistent_demo_new.c
AFL_DONT_OPTIMIZE=1 ../../afl-clang-fast -o test-instr test-instr.c
document:
AFL_DONT_OPTIMIZE=1 afl-clang-fast -D_AFL_DOCUMENT_MUTATIONS -o test-instr test-instr.c
AFL_DONT_OPTIMIZE=1 ../../afl-clang-fast -D_AFL_DOCUMENT_MUTATIONS -o test-instr test-instr.c
clean:
rm -f persistent_demo persistent_demo_new test-instr

View File

@ -2,7 +2,7 @@
int target_func(unsigned char *buf, int size) {
printf("buffer:%p, size:%p\n", buf, size);
printf("buffer:%p, size:%d\n", buf, size);
switch (buf[0]) {
case 1: