Bug #2174

macro argument expansion bug

Added by m.lombardi85 about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hi,

The attached patch fixes a bug in the AMD powernow driver, the abs()
macro was defined in a way that may lead to unexpected results due to
the macro argument expansion vs operator precedence:

----------
#define abs(x) ( x < 0 ? -x : x )
[...]
while (abs(vco_fid - vco_cfid) > 2) {
----------

Cheers,
--
--------------------
Maurizio Lombardi

0001-Fix-a-macro-argument-expansion-bug.patch Magnifier (849 Bytes) m.lombardi85, 10/31/2011 12:58 PM

History

#1 Updated by swildner about 3 years ago

Thanks Maurizio, I've committed it.

Also available in: Atom PDF