test : Maintain consistency in the usage of xcalloc

xcalloc is a wrapper for calloc. If it can't allocate memory then it
terminates the program. The current changes replace the usages of calloc
by xcalloc in tests.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
This commit is contained in:
Ravi Nanjundappa 2014-05-06 15:44:21 +05:30 committed by Bryce Harrington
parent 69e10bc8b5
commit d1453c512c
2 changed files with 2 additions and 2 deletions

View file

@ -41,7 +41,7 @@ draw (cairo_t *cr, int width, int height)
png = cairo_test_create_surface_from_png (ctx, png_filename);
stride = cairo_format_stride_for_width (format, width);
data = calloc (stride, height);
data = xcalloc (stride, height);
inv = cairo_image_surface_create_for_data (data + stride * (height - 1),
format, width, height, -stride);

View file

@ -41,7 +41,7 @@ draw (cairo_t *cr, int width, int height)
png = cairo_test_create_surface_from_png (ctx, png_filename);
stride = cairo_format_stride_for_width (format, width) + 12;
data = calloc (stride, height);
data = xcalloc (stride, height);
src = cairo_image_surface_create_for_data (data, format,
width, height, stride);