diff options
Diffstat (limited to 'src/scanflags.c')
-rw-r--r-- | src/scanflags.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/scanflags.c b/src/scanflags.c index 5beb24a..aa3de8a 100644 --- a/src/scanflags.c +++ b/src/scanflags.c @@ -40,7 +40,8 @@ void sf_push (void) { if (_sf_top_ix + 1 >= _sf_max) - _sf_stk = (scanflags_t*) flex_realloc ( (void*) _sf_stk, sizeof(scanflags_t) * (_sf_max += 32)); + _sf_max += 32; + _sf_stk = realloc(_sf_stk, sizeof(scanflags_t) * _sf_max); // copy the top element _sf_stk[_sf_top_ix + 1] = _sf_stk[_sf_top_ix]; @@ -59,7 +60,8 @@ void sf_init (void) { assert(_sf_stk == NULL); - _sf_stk = (scanflags_t*) flex_alloc ( sizeof(scanflags_t) * (_sf_max = 32)); + _sf_max = 32; + _sf_stk = malloc(sizeof(scanflags_t) * _sf_max); if (!_sf_stk) lerr_fatal(_("Unable to allocate %zu of stack"), sizeof(scanflags_t)); _sf_stk[_sf_top_ix] = 0; |