geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit 9525546dc2dc01b8d555990827959208282f66f8
parent 0b862a1985fd1623141a6b9463d0cc50e4fab158
Author: Quentin Rameau <quinq@fifth.space>
Date:   Thu, 30 Aug 2018 22:07:15 +0200

Actually, use xstrdup where we can not use strcpy

Signed-off-by: Christoph Lohmann <20h@r-36.net>

Diffstat:
ind.c | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/ind.c b/ind.c @@ -290,14 +290,9 @@ freeindex(Indexs *i) void addelem(Elems *e, char *s) { - int slen; - - slen = strlen(s) + 1; - e->num++; e->e = xrealloc(e->e, sizeof(char *) * e->num); - e->e[e->num - 1] = xmalloc(slen); - strcpy(e->e[e->num - 1], s); + e->e[e->num - 1] = xstrdup(s); return; }