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: <1402435605.4082.3.camel@joe-AO725>
Date:	Tue, 10 Jun 2014 14:26:45 -0700
From:	Joe Perches <joe@...ches.com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Stratos Karafotis <stratosk@...aphore.gr>,
	Dirk Brandewie <dirk.brandewie@...il.com>,
	dirk.j.brandewie@...el.com, Viresh Kumar <viresh.kumar@...aro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup

On Tue, 2014-06-10 at 23:38 +0200, Rafael J. Wysocki wrote:

> > > is.  And the result of (a * 100) / b may generally be different from
> > > a * 100 / b for integers (if the division is carried out first).
> > 
> > I thought that (a * 100) / b is always equivalent to a * 100 / b.
> 
> I'm not actually sure if that's guaranteed by C standards.

It is.  left to right, same precedence.

> It surely
> wasn't some time ago (when there was no formal C standard).

c89 is 25 years ago now.

> Either way, in my opinion it's better to put the parens into the expression
> in this particular case to clearly state the intention.

I don't think so.


--
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