logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git

reallocarray.c (371B)


  1. // utils-std: Collection of commonly available Unix tools
  2. // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. // SPDX-License-Identifier: MPL-2.0
  4. #define _POSIX_C_SOURCE 202405L
  5. #include "../lib/reallocarray.h"
  6. #include <stdlib.h> // reallocarray
  7. void
  8. test(void)
  9. {
  10. char *arr = NULL;
  11. (void)reallocarray(&arr, 69, sizeof(*arr));
  12. }