mirror of
https://github.com/libretro/RetroArch.git
synced 2025-12-28 05:24:00 +00:00
Warning fix
This commit is contained in:
parent
6af74f3b55
commit
11018c8356
@ -54,18 +54,13 @@ static int rmsgpack_dom_reader_state_push(
|
||||
{
|
||||
if ((s->i + 1) == s->capacity)
|
||||
{
|
||||
if (s->growable)
|
||||
{
|
||||
s->capacity *= 2;
|
||||
s->stack = (struct rmsgpack_dom_value **)realloc(s->stack, s->capacity * sizeof(struct rmsgpack_dom_value *));
|
||||
if (!s->stack)
|
||||
{
|
||||
printf("[RMSGPACK_DOM] failed to reallocate stack to %ld\n",
|
||||
s->capacity*sizeof(struct rmsgpack_dom_value *));
|
||||
if (!s->growable)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
s->capacity *= 2;
|
||||
s->stack = (struct rmsgpack_dom_value **)
|
||||
realloc(s->stack, s->capacity * sizeof(struct rmsgpack_dom_value *));
|
||||
if (!s->stack)
|
||||
return -1;
|
||||
}
|
||||
s->i++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user