diff --git a/src/common.h b/src/common.h index e885f4e..e39aa88 100644 --- a/src/common.h +++ b/src/common.h @@ -15,12 +15,12 @@ void vdie(const char *func, const char *errstr, ...); /* clang-format off */ -#define rerr(...) fprintf(stderr, __VA_ARGS__); -#define err(...) verr(__func__, __VA_ARGS__); -#define die(...) vdie(__func__, __VA_ARGS__); +#define rerr(...) fprintf(stderr, __VA_ARGS__) +#define err(...) verr(__func__, __VA_ARGS__) +#define die(...) vdie(__func__, __VA_ARGS__) #ifdef ENABLE_DEBUG -# define dbg(...) verr(__func__, __VA_ARGS__); +# define dbg(...) verr(__func__, __VA_ARGS__) #else # define dbg(...) #endif diff --git a/src/emu/ovni/event.c b/src/emu/ovni/event.c index 0d38207..0707607 100644 --- a/src/emu/ovni/event.c +++ b/src/emu/ovni/event.c @@ -23,7 +23,7 @@ pre_thread_execute(struct emu *emu, struct thread *th) if (cpu == NULL) { err("cannot find CPU with phyid %d in loom %s", - cpuid, emu->loom->id) + cpuid, emu->loom->id); return -1; } diff --git a/src/emu/ovniemu.c b/src/emu/ovniemu.c index 411d8af..eeba848 100644 --- a/src/emu/ovniemu.c +++ b/src/emu/ovniemu.c @@ -31,7 +31,6 @@ main(int argc, char *argv[]) /* continue to close the trace files */ err("emulation aborts!"); } else { - err("emulation ends"); ret = 0; } @@ -40,6 +39,11 @@ main(int argc, char *argv[]) ret = 1; } + if (ret == 0) + err("emulation ends ok"); + else + err("emulation ends with errors"); + free(emu); return ret;