A record array: copied at exact count, then the caller walks its fields. */
| 192 | |
| 193 | /* A record array: copied at exact count, then the caller walks its fields. */ |
| 194 | static void cr_array(cr_ctx_t *c, void **items, int count, size_t elem) { |
| 195 | if (!*items || count <= 0) { |
| 196 | if (c->phase == CR_COPY) { |
| 197 | *items = NULL; |
| 198 | } |
| 199 | return; |
| 200 | } |
| 201 | if (c->phase == CR_RELOCATE) { |
| 202 | if (cr_in_old_block(c, *items)) { |
| 203 | *items = (char *)*items + c->delta; |
| 204 | } |
| 205 | return; |
| 206 | } |
| 207 | cr_blob(c, (const void **)items, (size_t)count * elem); |
| 208 | } |
| 209 | |
| 210 | /* A NULL-terminated list of strings: the pointer array plus each string. */ |
| 211 | static void cr_list(cr_ctx_t *c, const char ***field) { |
no test coverage detected