Obfuscated code in xserver/os/io.c ?

Jesse Adkins jesserayadkins at gmail.com
Tue Sep 21 12:09:17 PDT 2010


Syntax-wise, they're the same thing. There's nothing technically wrong
with it, since it goes if -> if -> statement.

The first if sees everything in the second if as a single statement,
so no braces are required.

To my knowledge, this sort of construct is only a problem if there's
an else in there. Most compilers will apply the else to the proper
branch, but some won't.

I think the second one is more readable though, and consistent with
the rest of the file's coding.


More information about the xorg-devel mailing list