Skip to content

Commit 80a62f9

Browse files
committed
fixed typo, as pointed out by @TimTaylor
1 parent 1536d26 commit 80a62f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/assign.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ const char *memrecycle(const SEXP target, const SEXP where, const int start, con
873873
for (int k=0; k<nTargetLevels; ++k) SET_TRUELENGTH(targetLevelsD[k], 0); // don't need those anymore
874874
if (nAdd) {
875875
// cannot grow the levels yet as that would be R call which could fail to alloc and we have no hook to clear up
876-
SEXP *temp = malloc(sizeof(SEXP*) * nAdd);
876+
SEXP *temp = malloc(sizeof(*temp) * nAdd);
877877
if (!temp) {
878878
// # nocov start
879879
for (int k=0; k<nSourceLevels; ++k) SET_TRUELENGTH(sourceLevelsD[k], 0);
@@ -1282,8 +1282,8 @@ void savetl_init(void) {
12821282
}
12831283
nsaved = 0;
12841284
nalloc = 100;
1285-
saveds = malloc(sizeof(saveds) * nalloc);
1286-
savedtl = malloc(sizeof(R_len_t) * nalloc);
1285+
saveds = malloc(sizeof(*saveds) * nalloc);
1286+
savedtl = malloc(sizeof(*savedtl) * nalloc);
12871287
if (!saveds || !savedtl) {
12881288
free(saveds); free(savedtl); // # nocov
12891289
savetl_end(); // # nocov

0 commit comments

Comments
 (0)