check scripts: handle unintialized driver vars in check-driverimpls.pl

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>
This commit is contained in:
Nikolay Shirokovskiy 2018-04-18 17:17:37 +03:00
parent 489c4c688d
commit 1ccaf39402

View File

@ -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";