]> git.donarmstrong.com Git - debbugs.git/commitdiff
fix defined tests in spamscan-sa
authorDon Armstrong <don@donarmstrong.com>
Sun, 30 Mar 2008 02:54:25 +0000 (19:54 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 30 Mar 2008 02:54:25 +0000 (19:54 -0700)
scripts/spamscan.in

index d1acbe1d76ae420ac4b6ee9b337942fb4e92a2a1..5c79c30d623136b50c20688ed4daa042a0cb6a8e 100755 (executable)
@@ -134,14 +134,14 @@ getid:        for (;;) {
            }
            print $sain "$id\n$nf\n";
            lprint "{$mytid} $id is $nf\n";
-           my $keys;
-           unless (defined($keys = <$saout>)) {
+           my $keys = <$saout>
+           unless (defined $keys) {
                lprint "{$mytid} Could not get keys: $!\n";
                last pp;
            }
            chomp $keys;
-           my $messageid;
-           unless (defined($messageid = <$saout>)) {
+           my $messageid = <$saout>
+           unless (defined($messageid)) {
                lprint "{$mytid} Could not read messageid: $!\n";
                last pp;
            }
@@ -180,8 +180,8 @@ crossret:   for (;;) {
                lprint "{$mytid} Could not send ca_score: $!\n";
                last pp;
            }
-           my $todo;
-           unless (defined($todo = <$saout>)) {
+           my $todo = <$saout>;
+           unless (defined($todo)) {
                lprint "{$mytid} Could not read todo: $!\n";
                last pp;
            }
@@ -199,7 +199,7 @@ crossret:   for (;;) {
                print $sain "$todo\n";
                $nseen = <$saout>;
            }
-           unless($nseen) {
+           unless(defined($nseen)) {
                lprint "{$mytid} Could not read seen: $!\n";
                start_sa() if (scalar(@ids) > ($threadsrunning * $config{spam_spams_per_thread})
                    && $threadsrunning < $config{spam_max_threads});
@@ -207,8 +207,8 @@ crossret:   for (;;) {
            }
            chomp $nseen;
            $spamseen{$messageid} = $nseen if ($nseen);
-           my $out;
-           unless(defined($out = <$saout>)) {
+           my $out = <$saout>;
+           unless(defined($out)) {
                lprint "{$mytid} Could not read out: $!\n";
                last pp;
            }