bn_mp_clear_multi.c 417 B

12345678910111213141516171819
  1. #include "tommath_private.h"
  2. #ifdef BN_MP_CLEAR_MULTI_C
  3. /* LibTomMath, multiple-precision integer library -- Tom St Denis */
  4. /* SPDX-License-Identifier: Unlicense */
  5. #include <stdarg.h>
  6. void mp_clear_multi(mp_int *mp, ...)
  7. {
  8. mp_int *next_mp = mp;
  9. va_list args;
  10. va_start(args, mp);
  11. while (next_mp != NULL) {
  12. mp_clear(next_mp);
  13. next_mp = va_arg(args, mp_int *);
  14. }
  15. va_end(args);
  16. }
  17. #endif