You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Theo Van Dinter <fe...@kluge.net> on 2004/11/22 05:21:56 UTC

Re: svn commit: r106149 - /spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm

On Mon, Nov 22, 2004 at 03:40:41AM -0000, quinlan@apache.org wrote:
> +    if (@s && @h) {
> +      my $ratio = @s / @h;
> +      while (@s && @h) {
> +	push @messages, (@s / @h > $ratio) ? (shift @s) : (shift @h);

-1

this doesn't take into account when @h == 0.  it'd be easy to do a ternary for
$ratio to solve this.

-- 
Randomly Generated Tagline:
"Besides, I think [Slackware] sounds better than 'Microsoft,' don't you?"
 (By Patrick Volkerding)

Re: svn commit: r106149 - /spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm

Posted by Theo Van Dinter <fe...@kluge.net>.
On Sun, Nov 21, 2004 at 10:53:34PM -0800, Dan Quinlan wrote:
> In Soviet Russia, code vetos you.

Heh.  Thank you Yakov.

Actually, since that section of code is surrounded by "if (@s && @h) {", @h is
guaranteed to be >=1.  So I revoke my -1. :)

-- 
Randomly Generated Tagline:
"Do not meddle in the affairs of wizards,
 for they are subtle and quick to anger."    - Lord of the Rings

Re: svn commit: r106149 - /spamassassin/trunk/lib/Mail/SpamAssassin/ArchiveIterator.pm

Posted by Daniel Quinlan <qu...@pathname.com>.
Theo Van Dinter <fe...@kluge.net> writes:

> -1
> 
> this doesn't take into account when @h == 0.  it'd be easy to do a
> ternary for $ratio to solve this.

In Soviet Russia, code vetos you.

-- 
Daniel Quinlan
http://www.pathname.com/~quinlan/