]> git.proxmox.com Git - mirror_qemu.git/commit
qlit: Tighten QLit list vs QList comparison
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 25 Aug 2017 10:59:11 +0000 (12:59 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 4 Sep 2017 11:09:12 +0000 (13:09 +0200)
commitcbb654052600c376d5ee3401c98a25d09d11a154
tree60ca5d5d064445fbae2dbb40e05b82d9a30c37ed
parent6da8a7a3b444211914418d2b3c7dc615d70a7d2d
qlit: Tighten QLit list vs QList comparison

We check that all members of the QLit list are also in the QList.  We
neglect to check the other direction.  Fix that.

While there, use QLIST_FOREACH_ENTRY() to simplify the code and break
the loop on the first mismatch.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170825105913.4060-13-marcandre.lureau@redhat.com>
[Commit message improved]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
qobject/qlit.c
tests/check-qlit.c