* 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"
QObject *qlist_peek(QList *qlist)
{
QListEntry *entry;
- QObject *ret;
if (qlist == NULL || QTAILQ_EMPTY(&qlist->head)) {
return NULL;
entry = QTAILQ_FIRST(&qlist->head);
- ret = entry->value;
-
- return ret;
+ return entry->value;
}
int qlist_empty(const QList *qlist)