Patch to add guarding parentheses to some macros in linux/input.h
From: Simon Budig <hidden>
Date: 2011-06-01 22:03:39
Also in:
lkml
Attachments
- input-fix-macros.patch [text/x-patch] 2879 bytes · preview
From: Simon Budig <hidden>
Date: 2011-06-01 22:03:39
Also in:
lkml
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all.
This is a patch to add guarding parentheses around some macro argument
uses. This is good practice to avoid pitfalls like this:
ioctl (fd, EVIOCGABS (have_mt ? ABS_MT_POSITION_X : ABS_X), &abs);
Which currently totally does not do what is expected.
The attached patch adds parentheses to ensure correct operator precedence.
Please consider this for inclusion into the Linux Kernel.
Thanks,
Simon
- --
Simon Budig kernel concepts GbR
simon.budig@kernelconcepts.de Sieghuetter Hauptweg 48
+49-271-771091-17 D-57072 Siegen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3mrToACgkQO2O/RXesiHBWcQCfdYFhFgKGaxvE5szwIJe3vfNO
yy4AoJssXo0zvSYeVJqA/ViOVlq/ITyj
=jtQG
-----END PGP SIGNATURE-----