Re: [dwm] safe to remove

From: Sander van Dijk <a.h.vandijk_AT_gmail.com>
Date: Mon, 14 Aug 2006 20:33:59 +0200

No, because that would mean a zero-divide when n==1.

Gr. Sander.

On 8/14/06, Ross Mohn <rpmohn_AT_waxandwane.org> wrote:
> I believe this is safe to change in the dotile() function since h is
> only ever referenced when (n > 1).
> -RPM
>
> --- tag.000.c 2006-08-14 13:43:40.000000000 -0400
> +++ tag.c 2006-08-14 13:44:32.000000000 -0400
> @@ -68,10 +68,7 @@
> if(isvisible(c) && !c->isfloat)
> n++;
>
> - if(n > 1)
> - h = (sh - bh) / (n - 1);
> - else
> - h = sh - bh;
> + h = (sh - bh) / (n - 1);
>
> for(i = 0, c = clients; c; c = c->next) {
> c->ismax = False;
>
>
>
> _______________________________________________
> dwm mailing list
> dwm_AT_10kloc.org
> http://wmii.de/cgi-bin/mailman/listinfo/dwm
>
Received on Mon Aug 14 2006 - 20:34:00 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:30:09 UTC