projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df1d194
)
caseproto: Fix calculation in caseproto_reserve().
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 4 Mar 2023 00:32:24 +0000
(16:32 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 4 Mar 2023 00:32:39 +0000
(16:32 -0800)
This reserved way too much in a lot of cases.
src/data/caseproto.c
patch
|
blob
|
history
diff --git
a/src/data/caseproto.c
b/src/data/caseproto.c
index 4182004e4ac4a0f5ecd20653a8a7c8d6b10efb6d..f390c3f87cfd113ad1262504da30867181c60c8b 100644
(file)
--- a/
src/data/caseproto.c
+++ b/
src/data/caseproto.c
@@
-86,7
+86,7
@@
caseproto_reserve (struct caseproto *proto, size_t n_widths)
proto = caseproto_unshare (proto);
if (n_widths > proto->allocated_widths)
{
- proto->allocated_widths
*
= MAX (proto->allocated_widths * 2, n_widths);
+ proto->allocated_widths = MAX (proto->allocated_widths * 2, n_widths);
proto = xrealloc (proto, caseproto_size (proto->allocated_widths));
}
return proto;