From 1b4b4347c5dfaf72e61f74485e84bbd4d7368f04 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 12 Feb 2018 13:58:18 +0100 Subject: [PATCH] geoip: apply consistent style to xt_geoip_build --- geoip/xt_geoip_build | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/geoip/xt_geoip_build b/geoip/xt_geoip_build index f6558cf..fdd9fe9 100755 --- a/geoip/xt_geoip_build +++ b/geoip/xt_geoip_build @@ -8,12 +8,12 @@ use IO::Handle; use Text::CSV_XS; # or trade for Text::CSV use strict; -my $le32 = pack('V', 0x10000000); -my $be32 = pack('N', 0x10000000); +my $le32 = pack("V", 0x10000000); +my $be32 = pack("N", 0x10000000); my $u32 = undef; -sub wantBE { (!$u32 || $u32 eq $be32); } -sub wantLE { (!$u32 || $u32 eq $le32); } +sub wantBE { return !$u32 || $u32 eq $be32; } +sub wantLE { return !$u32 || $u32 eq $le32; } my $csv = Text::CSV_XS->new({ allow_whitespace => 1, @@ -35,13 +35,13 @@ if (!-d $target_dir) { } my @dbs = qw(LE BE); if ($native_only) { - $u32 = pack('L', 0x10000000); - if ($u32 eq $le32) { + $u32 = pack("L", 0x10000000); + if ($u32 eq $le32) { @dbs = qw(LE); } elsif ($u32 eq $be32) { @dbs = qw(BE); } else { - print STDERRR "Can't determine endianness.\n"; + print STDERRR "Cannot determine endianness.\n"; exit 1; } }