t* sacc + cursorline and uri preview URI git clone git://git.codevoid.de/sacc-sdk DIR Log DIR Files DIR Refs DIR LICENSE --- DIR commit e1eceee39ab489e5bc8ead2f8244b0cad3d1618f DIR parent 687f65e4cda6fdfe5eafd263bb30a091fe3443af URI Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 25 Feb 2018 15:53:29 +0100 use libc calloc() and show 'calloc:' on error Diffstat: M sacc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- DIR diff --git a/sacc.c b/sacc.c t@@ -121,10 +121,10 @@ xmalloc(const size_t n) static void * xcalloc(size_t n) { - char *m = xmalloc(n); + char *m = calloc(1, n); - while (n) - m[--n] = 0; + if (!m) + die("calloc: %s", strerror(errno)); return m; }