Exipick: reorder chomp
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 14 Nov 2019 16:11:29 +0000 (00:11 +0800)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Sat, 16 Nov 2019 02:28:38 +0000 (10:28 +0800)
src/src/exipick.src

index e121c99c805af746a0b8827b2d2b5cf7cc9209fc..a631333534af8b82b9cd1d5bd13ec2e35626331a 100644 (file)
@@ -25,6 +25,7 @@ my $p_version = "20100323.0";
 my $p_usage   = "Usage: $p_name [--help|--man|--version] (see --help for details)";
 my $p_cp      = <<EOM;
         Copyright (c) 2003-2010 John Jetmore <jj33\@pobox.com>
 my $p_usage   = "Usage: $p_name [--help|--man|--version] (see --help for details)";
 my $p_cp      = <<EOM;
         Copyright (c) 2003-2010 John Jetmore <jj33\@pobox.com>
+        Copyright (c) 2019 The Exim Maintainers
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -903,8 +904,8 @@ sub _parse_header {
   $self->{_vars}{message_age}      = time() - $self->{_vars}{received_time};
 
   TAGGED: while (<I>) {
   $self->{_vars}{message_age}      = time() - $self->{_vars}{received_time};
 
   TAGGED: while (<I>) {
-    chomp;
     my ($tag, $arg) = /^-?(-\S+)(?:\s+(.*))?$/ or last TAGGED;
     my ($tag, $arg) = /^-?(-\S+)(?:\s+(.*))?$/ or last TAGGED;
+    chomp;
 
     if ($tag eq '-acl') {
       my $t;
 
     if ($tag eq '-acl') {
       my $t;
@@ -1007,6 +1008,7 @@ sub _parse_header {
   # when we drop out of the while loop, we have the first line of the
   # delivered tree in $_
   do {
   # when we drop out of the while loop, we have the first line of the
   # delivered tree in $_
   do {
+    chomp;
     if ($_ eq 'XX') {
       ; # noop
     } elsif ($_ =~ s/^[YN][YN]\s+//) {
     if ($_ eq 'XX') {
       ; # noop
     } elsif ($_ =~ s/^[YN][YN]\s+//) {
@@ -1014,7 +1016,7 @@ sub _parse_header {
     } else {
       return(0);
     }
     } else {
       return(0);
     }
-    chomp($_ = <I>);
+    $_ = <I>;
   } while ($_ !~ /^\d+$/);
 
   $self->{_numrecips} = $_;
   } while ($_ !~ /^\d+$/);
 
   $self->{_numrecips} = $_;