]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
scripts: fix list indexing when printing mis-ordered symbols
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 3 Dec 2019 17:14:22 +0000 (17:14 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 4 Dec 2019 12:08:21 +0000 (12:08 +0000)
The python array slice syntax expects the first and last indexes,
not the first length and element count.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
scripts/check-symsorting.py

index 8e698c0657e60696b8eb824144d256cc4f419e76..006c42f1b335deb3ab64988d0d8bc0ce55a2d621 100755 (executable)
@@ -59,8 +59,8 @@ def check_sorting(group, symfile, line, groupfile, lastgroup):
             issorted = False
 
     if not issorted:
-        actual = group[first:(last - first + 1)]
-        expect = sortedgroup[first:(last - first + 1)]
+        actual = group[first:last]
+        expect = sortedgroup[first:last]
         print("Symbol block at %s:%s: symbols not sorted" %
               (symfile, line), file=sys.stderr)
         for g in actual: