macro argument expansion bug

Maurizio Lombardi m.lombardi85 at gmail.com
Mon Oct 31 05:57:56 PDT 2011


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
Attachment:
0001-Fix-a-macro-argument-expansion-bug.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00000.bin
Type: application/octet-stream
Size: 849 bytes
Desc: "Description: Binary data"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20111031/4c1b168a/attachment-0016.bin>


More information about the Submit mailing list