]> granicus.if.org Git - apache/commitdiff
Remove following warning:
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Sep 2002 00:57:35 +0000 (00:57 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Sep 2002 00:57:35 +0000 (00:57 +0000)
Use of uninitialized value in string eq at ./apxs line 134.

when the last option in getopt array is used.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96899 13f79535-47bb-0310-9956-ffa450edef68

support/apxs.in

index 91de152ef7cc6592be68ba02efb7778784a90be1..19e8aa0b3fb4f5bd00fe510de5ecc2613bca43fe 100644 (file)
@@ -131,7 +131,7 @@ sub Getopts {
         }
         my $pos = index($argumentative,$first);
         if ($pos >= $[) {
-            if ($args[$pos+1] eq ':') {
+            if ($pos < $#args && $args[$pos+1] eq ':') {
                 shift @ARGV;
                 if ($rest eq '') {
                     unless (@ARGV) {
@@ -142,7 +142,7 @@ sub Getopts {
                 }
                 eval "\$opt_$first = \$rest;";
             }
-            elsif ($args[$pos+1] eq '+') {
+            elsif ($pos < $#args && $args[$pos+1] eq '+') {
                 shift @ARGV;
                 if ($rest eq '') {
                     unless (@ARGV) {