]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
check scripts: handle unintialized driver vars in check-driverimpls.pl
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Wed, 18 Apr 2018 14:17:37 +0000 (17:17 +0300)
committerNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Thu, 19 Apr 2018 08:05:00 +0000 (11:05 +0300)
Current script confuses on lines like this:

static virHypervisorDriver parallelsHypervisorDriver;

It interprets next lines as if there is open brace.

Let's filter this case from matches.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/check-driverimpls.pl

index 4c28f2092aed570ada961f1a19ade90d99ab89ad..832a3900f416f33cc4ee11699c067e75f3b6e425 100755 (executable)
@@ -67,7 +67,7 @@ while (<>) {
                 $status = 1;
             }
         }
-    } elsif (/^(?:static\s+)?(vir(?:\w+)?Driver)\s+/) {
+    } elsif (/^(?:static\s+)?(vir(?:\w+)?Driver)\s+(?!.*;)/) {
         next if $1 eq "virNWFilterCallbackDriver" ||
                 $1 eq "virNWFilterTechDriver" ||
                 $1 eq "virConnectDriver";