smu

Simple markup processor
git clone https://git.sinitax.com/codemadness/smu
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 2a2b8581a3302d94a9d9d461b7c4ef882c58ab86
parent 9c68585ed395bc9db7339433746ec0dd8298cabc
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 13 May 2021 14:41:13 +0200

small code-style and "malloc" -> "realloc"

Diffstat:
Msmu.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/smu.c b/smu.c @@ -12,7 +12,7 @@ #endif #define LENGTH(x) sizeof(x)/sizeof(x[0]) -#define ADDC(b,i) if (i % BUFSIZ == 0) { b = realloc(b, (i + BUFSIZ)); if (!b) eprint("malloc"); } b[i] +#define ADDC(b,i) if (i % BUFSIZ == 0) { b = realloc(b, (i + BUFSIZ)); if (!b) eprint("realloc"); } b[i] typedef int (*Parser)(const char *, const char *, int); typedef struct { @@ -565,7 +565,7 @@ dosurround(const char *begin, const char *end, int newblock) do { stop = p; p = strstr(p + 1, surround[i].search); - } while(p && p[-1] == '\\'); + } while (p && p[-1] == '\\'); if (p && p[-1] != '\\') stop = p; if (!stop || stop < start || stop >= end)