lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2c0942db0912142002p638a187araa837812862e5b17@mail.gmail.com>
Date:	Mon, 14 Dec 2009 20:02:47 -0800
From:	Ray Lee <ray-lk@...rabbit.org>
To:	Justin Madru <jdm64@...ab.com>
Cc:	gregkh@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: s5k3e2fx.c: reduce complexity by factoring

On Sat, Dec 5, 2009 at 6:03 PM, Justin Madru <jdm64@...ab.com> wrote:
> I was style fixing some code when I ran into this code.
> It seems like the code could be reduced, by factoring the expression.
> But this results in a very simple expression.
>
> Am I assuming something wrong? Or is this a bug in the original code?
> This doesn't look right because the assignment of s_move[i] has no mention
> of the loop counter.

Algebraic factoring is not valid in general when dealing with pure
integer expressions that may contain rounding issues. I haven't
checked to see if that's the case with the code you're changing, but
that sort of expression you're removing is very commonly used exactly
to deal with rounding issues.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ