diff options
author | eadler <eadler@FreeBSD.org> | 2015-04-18 23:56:04 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2015-04-18 23:56:04 +0000 |
commit | 57ac9a58dea077343c11cf8c3eacd90379dfb59c (patch) | |
tree | e2e80544ff6272e52cb43e5c8652ff318ee45a57 | |
parent | 5ae6ee36a954c208f9859b1596737b5e75fbef3f (diff) | |
download | FreeBSD-src-57ac9a58dea077343c11cf8c3eacd90379dfb59c.zip FreeBSD-src-57ac9a58dea077343c11cf8c3eacd90379dfb59c.tar.gz |
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
-rw-r--r-- | bin/ed/glbl.c | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |