pixman/test/trap-crasher.c
Andrea Canciani 97b9fa090c Use the ARRAY_LENGTH() macro when possible
This patch has been generated by the following Coccinelle semantic patch:

// Use the ARRAY_LENGTH() macro when possible
//
// Replace open-coded array length computations with the
// ARRAY_LENGTH() macro

@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(T))
+ ARRAY_LENGTH (E)
2011-11-09 09:17:00 +01:00

28 lines
411 B
C

#include <stdlib.h>
#include "utils.h"
int
main()
{
pixman_image_t *dst;
pixman_trapezoid_t traps[1] = {
{
2147483646,
2147483647,
{
{ 0, 0 },
{ 0, 2147483647 }
},
{
{ 65536, 0 },
{ 0, 2147483647 }
}
},
};
dst = pixman_image_create_bits (PIXMAN_a8, 1, 1, NULL, -1);
pixman_add_trapezoids (dst, 0, 0, ARRAY_LENGTH (traps), traps);
return (0);
}