summaryrefslogtreecommitdiff
path: root/kicad/sexpr.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-22 21:00:10 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-22 21:00:40 -0300
commitce690a463d1905b2aba8a04c29a248af66153681 (patch)
tree96072589d04ca8b1c536c6a0b5c8f58c7c2a21b1 /kicad/sexpr.c
parent8dfb6b2c9f722d70b30e5794fe20ce9450dd05d4 (diff)
downloadeeshow-ce690a463d1905b2aba8a04c29a248af66153681.tar.gz
eeshow-ce690a463d1905b2aba8a04c29a248af66153681.tar.bz2
eeshow-ce690a463d1905b2aba8a04c29a248af66153681.zip
eeshow/misc/util.h (realloc_size, realloc_type_n): get rid of bare "realloc"
Finally ! Shoulds have done this a long time ago.
Diffstat (limited to 'kicad/sexpr.c')
-rw-r--r--kicad/sexpr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kicad/sexpr.c b/kicad/sexpr.c
index 0727891..6f0fd2f 100644
--- a/kicad/sexpr.c
+++ b/kicad/sexpr.c
@@ -83,9 +83,7 @@ static void add_string(struct sexpr_ctx *ctx, const char *end)
if (!new)
return;
- e->s = realloc(e->s, old + new + 1);
- if (!e->s)
- diag_pfatal("realloc");
+ e->s = realloc_size(e->s, old + new + 1);
memcpy(e->s + old, ctx->p, new);
e->s[old + new] = 0;
}