Re: [PATCH 01/10] ivec: introduce the C side of ivec
"Ezekiel Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
> + if (new_capacity == 0) {
> + free(self->ptr);
> + self->ptr = NULL; if (!new_capacity)
FREE_AND_NULL(self->ptr);
else
...;
Show 6 quoted lines
> +void ivec_free(void *self_)
> +{
> + struct IVec_c_void *self = self_;
> +
> + free(self->ptr);
> + self->ptr = NULL;Likewise. Otherwise the code will fail coccicheck.
> + self->length = 0;
> + self->capacity = 0;
> + // DO NOT MODIFY element_size!!!
/* A single-liner comment in our codebase looks like this */