2017-06-14 13:55 GMT+02:00 Samuel Pitoiset <samuel.pitoi...@gmail.com>:
> Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
> ---
>  src/util/u_dynarray.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h
> index 57f96ff79c0..cc316323f28 100644
> --- a/src/util/u_dynarray.h
> +++ b/src/util/u_dynarray.h
> @@ -68,6 +68,12 @@ util_dynarray_fini(struct util_dynarray *buf)
>     }
>  }
>
> +static inline void
> +util_dynarray_clear(struct util_dynarray *buf)
> +{
> +       buf->size = 0;
> +}
> +

The indentation looks a bit off here? Also, I agree with Marek;
clear indicates to me that the memory is either freed or that
it is cleared to NULL.

>  #define DYN_ARRAY_INITIAL_SIZE 64
>
>  /* use util_dynarray_trim to reduce the allocated storage */
> --
> 2.13.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to