]> Git Repo - qemu.git/blobdiff - qobject/qlist.c
qapi-schema: Collect run state stuff in qapi/run-state.json
[qemu.git] / qobject / qlist.c
index 3c045aed11e95b3b4af9662b34c5e38c1b572cd7..86b60cb88ccbeff25d95b29d1c73c92ba9970985 100644 (file)
@@ -10,6 +10,7 @@
  * See the COPYING.LIB file in the top-level directory.
  */
 
+#include "qemu/osdep.h"
 #include "qapi/qmp/qlist.h"
 #include "qapi/qmp/qobject.h"
 #include "qemu/queue.h"
@@ -99,7 +100,6 @@ QObject *qlist_pop(QList *qlist)
 QObject *qlist_peek(QList *qlist)
 {
     QListEntry *entry;
-    QObject *ret;
 
     if (qlist == NULL || QTAILQ_EMPTY(&qlist->head)) {
         return NULL;
@@ -107,9 +107,7 @@ QObject *qlist_peek(QList *qlist)
 
     entry = QTAILQ_FIRST(&qlist->head);
 
-    ret = entry->value;
-
-    return ret;
+    return entry->value;
 }
 
 int qlist_empty(const QList *qlist)
This page took 0.0205 seconds and 4 git commands to generate.