diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-03-14 19:45:55 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-03-14 19:49:37 +0800 |
| commit | c39a32d111e7cccb9ef2063d6723d91ba3755565 (patch) | |
| tree | cfc69cdd08342fa2795f04ec59798c652fd1bb3a /mem.c | |
| parent | 3eccf3989f17668676fb42b73843578b87eef569 (diff) | |
| download | cvn-c39a32d111e7cccb9ef2063d6723d91ba3755565.tar.gz | |
Implement status command in C.
Diffstat (limited to 'mem.c')
| -rw-r--r-- | mem.c | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -1,22 +0,0 @@ -#include <err.h> -#include <stdlib.h> - -#include "mem.h" - -void *_xmalloc(size_t s, const char *file, int line) -{ - void *p; - - if (!(p = malloc(s))) - err(1, "%s:%d: malloc", file, line); - return p; -} - -void *_xrealloc(void *ptr, size_t s, const char *file, int line) -{ - void *p; - - if (!(p = realloc(ptr, s))) - err(1, "%s:%d: realloc", file, line); - return p; -} |
