From d1453c512c8213115bd489b3ea8849b1c840b551 Mon Sep 17 00:00:00 2001 From: Ravi Nanjundappa Date: Tue, 6 May 2014 15:44:21 +0530 Subject: [PATCH] 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 --- test/negative-stride-image.c | 2 +- test/stride-12-image.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/negative-stride-image.c b/test/negative-stride-image.c index a407b8cf9..dfc8d644d 100644 --- a/test/negative-stride-image.c +++ b/test/negative-stride-image.c @@ -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); diff --git a/test/stride-12-image.c b/test/stride-12-image.c index 21bd8b024..5650e9830 100644 --- a/test/stride-12-image.c +++ b/test/stride-12-image.c @@ -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);