summaryrefslogtreecommitdiff
path: root/nasmlib
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-09 13:30:19 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-09 13:30:19 -0700
commit177a05d0ce75eeee49a98944b9c7e7efa971a0a6 (patch)
tree041859be3209522e20fc7a9164a36048e42e5d88 /nasmlib
parent2503cc09a2f749669609e5c2b3a744426720acd1 (diff)
downloadnasm-177a05d0ce75eeee49a98944b9c7e7efa971a0a6.tar.gz
perl files: clean up warnings
Clean up some perl warnings, some of which were legitimate (apparently undef doesn't actually take a list of arguments, a common enough mistake that it is mentioned in the man page!, and a list of variables after "my" can be cantankerous), and some of which were nuisance but were easy enough to clean up. Maybe this can resolve the problems with very old version of Perl? Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'nasmlib')
-rwxr-xr-xnasmlib/perfhash.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/nasmlib/perfhash.pl b/nasmlib/perfhash.pl
index 639b347f..8df21f69 100755
--- a/nasmlib/perfhash.pl
+++ b/nasmlib/perfhash.pl
@@ -211,9 +211,9 @@ foreach my $s (keys(%strings)) {
} else {
$enumvals{$v} = $es;
}
- $max_enum = $v if ($v > $max_enum || !defined($max_enum));
- $tbloffs = $v if ($v < $tbloffs || !defined($tbloffs));
- $tbllen = $v+1 if ($v >= $tbllen || !defined($tbllen));
+ $max_enum = $v if (!defined($max_enum) || $v > $max_enum);
+ $tbloffs = $v if (!defined($tbloffs) || $v < $tbloffs);
+ $tbllen = $v+1 if (!defined($tbllen) || $v >= $tbllen);
}
foreach my $s (keys(%specials)) {
my $es = $prefix . $s; # No string mangling here