summaryrefslogtreecommitdiff
path: root/scripts/policy
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-28 08:56:17 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-28 08:56:17 -0800
commit6466ce552b8cf9e5c2548645016846b7697588eb (patch)
tree180d475d11dae4bc1dd65be7fde8a2bb3c12c9a3 /scripts/policy
parentc1d4c44042edbcdfe0b998360460fe0f20902274 (diff)
downloadvyatta-cfg-quagga-6466ce552b8cf9e5c2548645016846b7697588eb.tar.gz
vyatta-cfg-quagga-6466ce552b8cf9e5c2548645016846b7697588eb.zip
check-as-prepend: turn on strict
And reindent.
Diffstat (limited to 'scripts/policy')
-rwxr-xr-xscripts/policy/vyatta-check-as-prepend.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/policy/vyatta-check-as-prepend.pl b/scripts/policy/vyatta-check-as-prepend.pl
index a34ca0a7..ba2c4f3e 100755
--- a/scripts/policy/vyatta-check-as-prepend.pl
+++ b/scripts/policy/vyatta-check-as-prepend.pl
@@ -1,10 +1,11 @@
#!/usr/bin/perl
-@as_list = split(' ',$ARGV[0]);
-foreach $as (@as_list) {
- if ($as =~ /[^\d\s]/ || $as < 1 || $as > 4294967294) { exit 1;}
-}
-if (scalar(@as_list) > 24) {
- print "Error: max 24 as paths";
- exit 1;
+use strict;
+
+my @as_list = split( ' ', $ARGV[0] );
+foreach my $as (@as_list) {
+ exit 1 if ( $as =~ /[^\d\s]/ || $as < 1 || $as > 4294967294 );
}
+
+die "Error: max 24 as path\n" if ( scalar(@as_list) > 24 );
+
exit 0;