- fix odd number of elements warning
authorMichael Schroeder <mls@suse.de>
Thu, 27 Sep 2012 16:19:01 +0000 (18:19 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 27 Sep 2012 16:19:01 +0000 (18:19 +0200)
Build/Rpm.pm

index 9cbb272..30370fb 100644 (file)
@@ -128,7 +128,7 @@ sub grabargs {
   my %m;
   $m{'0'} = $macname;
   $m{'**'} = join(' ', @args);
-  my %go = split(/(:?)/, $getopt);
+  my %go = (split(/(:?)/, $getopt, -1), undef);
   while (@args && $args[0] =~ s/^-//) {
     my $o = shift @args;
     last if $o eq '-';
@@ -331,7 +331,7 @@ reexpand:
            $line = 'MACRO';
            last;
          }
-         if ($macros_args{$macname}) {
+         if (defined($macros_args{$macname})) {
            # macro with args!
            if (!defined($macdata)) {
              $line =~ /^\s*([^\n]*).*?$/;