aboutsummaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2017-10-04 18:44:20 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2017-10-05 10:22:44 -0400
commit45042732f39ecd42794c256bf98f231e58849c3e (patch)
tree0a98a7675d21e1c2d8440d2fc09f0058e450693c /scripts/checkpatch.pl
parent5456c6a4ec9cd8fc314ddc303e88bf85c110975c (diff)
checkpatch: fix incompatibility with old perl
Do not use '/r' modifier which was introduced in perl 5.14. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Fixes: 3e5875afc0f ("checkpatch: check trace-events code style") Tested-by: Alex Williamson <alex.williamson@redhat.com> Message-id: 20171004154420.34596-1-vsementsov@virtuozzo.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3c0a28e644..0c41f1212f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1432,7 +1432,8 @@ sub process {
qr/%[-+ *.0-9]*([hljztL]|ll|hh)?(x|X|"\s*PRI[xX][^"]*"?)/;
# don't consider groups splitted by [.:/ ], like 2A.20:12ab
- my $tmpline = $rawline =~ s/($hex[.:\/ ])+$hex//gr;
+ my $tmpline = $rawline;
+ $tmpline =~ s/($hex[.:\/ ])+$hex//g;
if ($tmpline =~ /(?<!0x)$hex/) {
ERROR("Hex numbers must be prefixed with '0x'\n" .