[PATCH] list.h: don't crash when removing an element from a NULL list

Keith Packard keithp at keithp.com
Thu Jul 5 09:59:55 PDT 2012

Peter Hutterer <peter.hutterer at who-t.net> writes:

> no, but the selinux fix will need it (partially out of laziness, partially
> to make the code nicer).

Ok. I'll merged it in then.

>> (the more I see of these twisty list macros, the more I prefer
>> open-coded lists though; wow this is hard to understand).
> given how often we've found bugs in open-coded lists I disagree.
> yes, they're hairy but they're tested, the macro behaves the same
> everywhere. and if you really worry about the code being wrong, run it
> through the pre-processor and it will look like an open-coded list.

It's all a tradeoff -- I just don't like having to learn a new
programming language each time I see a new set of list macros (or other
macro programming of this nature). Reminds me of how loathsome C++
templates are.

keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120705/4764762f/attachment.pgp>

More information about the xorg-devel mailing list