Comment 21 for bug 551193

Revision history for this message
In , Olivier (olivier-redhat-bugs) wrote :

True, but the problem the patch is meant to address primarily is the X server crash induced by a wrong macro expansion (rather than changing the macro itself).

For comparison, Pixman uses that definition:

  #define MOD(a, b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))

in http://cgit.freedesktop.org/pixman/tree/pixman/pixman-private.h

And uses of that macro for example in walk_region_internal() from http://cgit.freedesktop.org/pixman/tree/pixman/pixman.c which is quite similar to the implementation of the "old" fbComposite()