From 57ac9a58dea077343c11cf8c3eacd90379dfb59c Mon Sep 17 00:00:00 2001 From: eadler Date: Sat, 18 Apr 2015 23:56:04 +0000 Subject: 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(-) (limited to 'bin/ed') diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c index 5524700..029f4f2 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(); -- cgit v1.1