aboutsummaryrefslogtreecommitdiff
path: root/scripts/vmstate-static-checker.py
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2016-06-17 17:46:39 +0530
committerAmit Shah <amit.shah@redhat.com>2016-06-17 18:24:33 +0530
commit0794d8895ef8d1bd6db528e5d9ca19b86297803b (patch)
treec66f57ee59521bbff2cf581bf8bb6c6c926cd5ef /scripts/vmstate-static-checker.py
parent0d9f9a5c5237c7c9241b38769a2d06959c943f8b (diff)
vmstate-static-checker: fix size mismatch detection in unused fields
If a field changed from something to unused, the checker wasn't flagging if the field size mismatched. This was noticed in: http://thread.gmane.org/gmane.comp.emulators.qemu/419802 where the 4->1 size change along with field name change to 'unused' wasn't being flagged. Fix this. Signed-off-by: Amit Shah <amit.shah@redhat.com> Message-Id: <d7ec03a9b2edfa0616764887a51ba8f64fdd3f68.1466165736.git.amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'scripts/vmstate-static-checker.py')
-rwxr-xr-xscripts/vmstate-static-checker.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index b5ecaf644d..14a27e7f6a 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -185,7 +185,7 @@ def check_fields(src_fields, dest_fields, desc, sec):
if unused_count == 0:
advance_dest = True
- if unused_count > 0:
+ if unused_count != 0:
if advance_dest == False:
unused_count = unused_count - s_item["size"]
if unused_count == 0: