summaryrefslogtreecommitdiff
path: root/bin/ed
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2015-04-18 23:56:04 +0000
committerEitan Adler <eadler@FreeBSD.org>2015-04-18 23:56:04 +0000
commite6743d31d302e32d68dcc1d016c18c25d28e7bdd (patch)
treee2e80544ff6272e52cb43e5c8652ff318ee45a57 /bin/ed
parenta59f8174918000d12907cc27e51326e06a686c80 (diff)
downloadsrc-test-e6743d31d302e32d68dcc1d016c18c25d28e7bdd.tar.gz
src-test-e6743d31d302e32d68dcc1d016c18c25d28e7bdd.zip
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
Notes
Notes: svn path=/head/; revision=281719
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/glbl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c
index 5524700983e8a..029f4f2ca6628 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();