From 9b4b10a31954c00813a7cbf9411d30bc84eccea8 Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 17 Apr 2021 23:38:23 +0200 Subject: add memset --- lib/include/common.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/include/common.h') diff --git a/lib/include/common.h b/lib/include/common.h index 631c25f..1e48097 100644 --- a/lib/include/common.h +++ b/lib/include/common.h @@ -5,10 +5,13 @@ #include "io.h" #include "syscalls.h" -#define ERROR_ON(cond, fmt, ...) \ - do { \ - if ((cond)) { \ - efmt("%s:%d " fmt, __FILE__, __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ - _exit(1); \ - } \ +#define ERROR_ON(cond, fmt, ...) \ + do { \ + if ((cond)) { \ + efmt("%s:%d " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \ + _exit(1); \ + } \ } while (0) + + +void* memset(void* s, int c, size_t n); -- cgit v1.2.3