From e6743d31d302e32d68dcc1d016c18c25d28e7bdd Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Sat, 18 Apr 2015 23:56:04 +0000 Subject: [PATCH] bin/ed: use correct type in multiplication The result is line_t** so the multiplication should be size * sizeof(line_t*) MFC After: 1 month --- bin/ed/glbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c index 5524700983e8..029f4f2ca662 100644 --- a/bin/ed/glbl.c +++ b/bin/ed/glbl.c @@ -153,7 +153,7 @@ set_active_node(line_t *lp) if (active_list != NULL) { #endif if ((ts = (line_t **) realloc(active_list, - (ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { + (ti += MINBUFSZ) * sizeof(line_t *))) == NULL) { fprintf(stderr, "%s\n", strerror(errno)); errmsg = "out of memory"; SPL0();