We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6af74f3 commit 11018c8Copy full SHA for 11018c8
1 file changed
libretro-db/rmsgpack_dom.c
@@ -54,18 +54,13 @@ static int rmsgpack_dom_reader_state_push(
54
{
55
if ((s->i + 1) == s->capacity)
56
57
- if (s->growable)
58
- {
59
- s->capacity *= 2;
60
- s->stack = (struct rmsgpack_dom_value **)realloc(s->stack, s->capacity * sizeof(struct rmsgpack_dom_value *));
61
- if (!s->stack)
62
63
- printf("[RMSGPACK_DOM] failed to reallocate stack to %ld\n",
64
- s->capacity*sizeof(struct rmsgpack_dom_value *));
65
- return -1;
66
- }
67
68
- else
+ if (!s->growable)
+ return -1;
+
+ s->capacity *= 2;
+ s->stack = (struct rmsgpack_dom_value **)
+ realloc(s->stack, s->capacity * sizeof(struct rmsgpack_dom_value *));
+ if (!s->stack)
69
return -1;
70
}
71
s->i++;
0 commit comments