aboutsummaryrefslogtreecommitdiffstats
path: root/src/zsetu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zsetu.c')
-rw-r--r--src/zsetu.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/zsetu.c b/src/zsetu.c
index c3c3510..2e60c28 100644
--- a/src/zsetu.c
+++ b/src/zsetu.c
@@ -1,8 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include "internals"
-#include <stdlib.h>
-
#define SIZE_MULTIPLE(fit, in) ((sizeof(fit) + sizeof(in) - 1) / sizeof(in))
@@ -13,10 +11,8 @@ zsetu(z_t a, unsigned long long int b)
SET_SIGNUM(a, 0);
return;
}
- if (a->alloced < SIZE_MULTIPLE(b, *(a->chars))) {
- a->alloced = SIZE_MULTIPLE(b, *(a->chars));
- a->chars = realloc(a->chars, SIZE_MULTIPLE(b, *(a->chars)) * sizeof(*(a->chars)))
- }
+ if (a->alloced < SIZE_MULTIPLE(b, *(a->chars)))
+ zahl_realloc(a, SIZE_MULTIPLE(b, *(a->chars)))
SET_SIGNUM(a, 1);
a->used = 0;
while (b) {