mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-20 20:17:54 +00:00
qapi: Clean up after commit 3d344c2
Drop unused QIV_STACK_SIZE and unused qobject_input_start_struct() parameter errp. Backports commit b8874fbfd329b5084463bcacd1418d493a93c383 from qemu
This commit is contained in:
parent
d7da652d4e
commit
fdf09c6d12
|
@ -20,8 +20,6 @@
|
||||||
#include "qapi/qmp/types.h"
|
#include "qapi/qmp/types.h"
|
||||||
#include "qapi/qmp/qerror.h"
|
#include "qapi/qmp/qerror.h"
|
||||||
|
|
||||||
#define QIV_STACK_SIZE 1024
|
|
||||||
|
|
||||||
typedef struct StackObject
|
typedef struct StackObject
|
||||||
{
|
{
|
||||||
QObject *obj; /* Object being visited */
|
QObject *obj; /* Object being visited */
|
||||||
|
@ -101,8 +99,8 @@ static void qdict_add_key(const char *key, QObject *obj, void *opaque)
|
||||||
g_hash_table_insert(h, (gpointer) key, NULL);
|
g_hash_table_insert(h, (gpointer) key, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const QListEntry *qobject_input_push(QObjectInputVisitor *qiv, QObject *obj,
|
static const QListEntry *qobject_input_push(QObjectInputVisitor *qiv,
|
||||||
void *qapi, Error **errp)
|
QObject *obj, void *qapi)
|
||||||
{
|
{
|
||||||
GHashTable *h;
|
GHashTable *h;
|
||||||
StackObject *tos = g_new0(StackObject, 1);
|
StackObject *tos = g_new0(StackObject, 1);
|
||||||
|
@ -174,7 +172,6 @@ static void qobject_input_start_struct(Visitor *v, const char *name, void **obj,
|
||||||
{
|
{
|
||||||
QObjectInputVisitor *qiv = to_qiv(v);
|
QObjectInputVisitor *qiv = to_qiv(v);
|
||||||
QObject *qobj = qobject_input_get_object(qiv, name, true, errp);
|
QObject *qobj = qobject_input_get_object(qiv, name, true, errp);
|
||||||
Error *err = NULL;
|
|
||||||
|
|
||||||
if (obj) {
|
if (obj) {
|
||||||
*obj = NULL;
|
*obj = NULL;
|
||||||
|
@ -188,11 +185,7 @@ static void qobject_input_start_struct(Visitor *v, const char *name, void **obj,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qobject_input_push(qiv, qobj, obj, &err);
|
qobject_input_push(qiv, qobj, obj);
|
||||||
if (err) {
|
|
||||||
error_propagate(errp, err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj) {
|
if (obj) {
|
||||||
*obj = g_malloc0(size);
|
*obj = g_malloc0(size);
|
||||||
|
@ -218,7 +211,7 @@ static void qobject_input_start_list(Visitor *v, const char *name,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = qobject_input_push(qiv, qobj, list, errp);
|
entry = qobject_input_push(qiv, qobj, list);
|
||||||
if (list) {
|
if (list) {
|
||||||
if (entry) {
|
if (entry) {
|
||||||
*list = g_malloc0(size);
|
*list = g_malloc0(size);
|
||||||
|
|
Loading…
Reference in a new issue