Remove semicolon from error macros

This commit is contained in:
Rodrigo Arias 2023-02-16 15:49:21 +01:00 committed by Rodrigo Arias Mallo
parent f76d160c69
commit 0a9530dc6d
3 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;