You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2004/08/06 11:09:46 UTC

svn commit: rev 36031 - spamassassin/trunk/masses

Author: quinlan
Date: Fri Aug  6 02:09:45 2004
New Revision: 36031

Modified:
   spamassassin/trunk/masses/hit-frequencies
Log:
trivial fix for warning


Modified: spamassassin/trunk/masses/hit-frequencies
==============================================================================
--- spamassassin/trunk/masses/hit-frequencies	(original)
+++ spamassassin/trunk/masses/hit-frequencies	Fri Aug  6 02:09:45 2004
@@ -153,7 +153,9 @@
   push (@tests, $test);
 
   my $isnice = 0;
-  if ($rules{$test}->{tflags} =~ /nice/) { $isnice = 1; }
+  if ($rules{$test}->{tflags} && $rules{$test}->{tflags} =~ /\bnice\b/) {
+    $isnice = 1;
+  }
 
   my $fs = $freq_spam{$test}; $fs ||= 0;
   my $fn = $freq_ham{$test}; $fn ||= 0;
@@ -274,9 +276,11 @@
   next if ($opt_m && $test !~ m/$opt_m/);	# match certain tests
   next if ($opt_t && $rules{$test}->{tflags} !~ /$opt_t/); # match tflags
 
-  if (!$opt_a && !$opt_t) {
-    next if ($rules{$test}->{tflags} =~ /net/ && ($opt_s % 2 == 0));   # not net tests
-    next if ($rules{$test}->{tflags} =~ /userconf/); # or userconf
+  if (!$opt_a && !$opt_t && $rules{$test}->{tflags}) {
+    # not net tests
+    next if ($rules{$test}->{tflags} =~ /\bnet\b/ && ($opt_s % 2 == 0));
+    # not userconf
+    next if ($rules{$test}->{tflags} =~ /\buserconf\b/);
   }
 
   # adjust based on corpora sizes (and cvt to % while we're at it)