feature/igc3 184f85aef7f 2/2: [MPS] Make igc_xpalloc_raw follow the xpalloc API (bug#81283)
Pip Cet via Mailing list for Emacs changes <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: feature/igc3 commit 184f85aef7fd9dc778bc953a483623f91df3fae7 Author: Pip Cet <[email protected]> Commit: Pip Cet <[email protected]> [MPS] Make igc_xpalloc_raw follow the xpalloc API (bug#81283) * src/igc.c (igc_xpalloc_raw): When PA is NULL, use *NITEMS to determine the new size but don't copy any elements. --- src/igc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/igc.c b/src/igc.c index db3fcfd071f..b66c86939a7 100644 --- a/src/igc.c +++ b/src/igc.c @@ -4170,7 +4170,7 @@ igc_xpalloc_raw (void *pa, ptrdiff_t *nitems, const char *label) { ptrdiff_t nitems_old = pa ? *nitems : 0; - ptrdiff_t nitems_new = nitems_old; + ptrdiff_t nitems_new = *nitems; ptrdiff_t nbytes = xpalloc_nbytes (pa, &nitems_new, nitems_incr_min, nitems_max, sizeof (void *)); void **old = pa;