<div dir="ltr">Will this compile everywhere?</div><div class="gmail_extra"><br clear="all"><div>Best regards<br>Petr Kobalicek<br></div>
<br><br><div class="gmail_quote">On Tue, May 6, 2014 at 12:25 PM, RAVI NANJUNDAPPA <span dir="ltr"><<a href="mailto:nravi.n@samsung.com" target="_blank">nravi.n@samsung.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Kindly ignore the previous mail. That was sent in the HTML format, by<br>
mistake.<br>
Sorry for the inconvenience caused.<br>
<div class=""><br>
I've done the basic build test with the changes and the build works fine.<br>
I've also tried to execute "negative-stride-image" and "stride-12-image"<br>
tests with and without these changes.<br>
</div>In both the scenarios the test results are same.<br>
<div class=""><br>
Thanks and Best Regards,<br>
N Ravi<br>
<br>
</div>From: cairo [mailto:<a href="mailto:cairo-bounces@cairographics.org">cairo-bounces@cairographics.org</a>] On Behalf Of RAVI<br>
NANJUNDAPPA<br>
Sent: Tuesday, May 06, 2014 3:52 PM<br>
To: <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
Subject: Re: [cairo] [PATCH] test : Maintain consistency in the usage of<br>
<div class="HOEnZb"><div class="h5">xcalloc<br>
<br>
Hi,<br>
<br>
I've done the basic build test with the changes and the build works fine.<br>
I've also tried to execute "negative-stride-image" and "stride-12-image"<br>
tests with and without these changes.<br>
In both the scenarios the results are same.<br>
<br>
Thanks and Best Regards,<br>
N Ravi<br>
<br>
------- Original Message -------<br>
Sender : RAVI NANJUNDAPPA<<a href="mailto:nravi.n@samsung.com">nravi.n@samsung.com</a>> Technical<br>
Lead/SRI-Bangalore-TZN/Samsung Electronics<br>
Date : May 06, 2014 15:44 (GMT+05:30)<br>
Title : [PATCH] test : Maintain consistency in the usage of xcalloc<br>
<br>
xcalloc is a wrapper for calloc. If it can't allocate memory then it<br>
terminates the program. The current changes replace the usages of calloc<br>
by xcalloc in tests.<br>
<br>
Signed-off-by: Ravi Nanjundappa<br>
---<br>
test/negative-stride-image.c | 2 +-<br>
test/stride-12-image.c | 2 +-<br>
2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/test/negative-stride-image.c b/test/negative-stride-image.c<br>
index a407b8c..dfc8d64 100644<br>
--- a/test/negative-stride-image.c<br>
+++ b/test/negative-stride-image.c<br>
@@ -41,7 +41,7 @@ draw (cairo_t *cr, int width, int height)<br>
png = cairo_test_create_surface_from_png (ctx, png_filename);<br>
<br>
stride = cairo_format_stride_for_width (format, width);<br>
- data = calloc (stride, height);<br>
+ data = xcalloc (stride, height);<br>
inv = cairo_image_surface_create_for_data (data + stride * (height -<br>
1),<br>
format, width, height, -stride);<br>
<br>
diff --git a/test/stride-12-image.c b/test/stride-12-image.c<br>
index 21bd8b0..5650e98 100644<br>
--- a/test/stride-12-image.c<br>
+++ b/test/stride-12-image.c<br>
@@ -41,7 +41,7 @@ draw (cairo_t *cr, int width, int height)<br>
png = cairo_test_create_surface_from_png (ctx, png_filename);<br>
<br>
stride = cairo_format_stride_for_width (format, width) + 12;<br>
- data = calloc (stride, height);<br>
+ data = xcalloc (stride, height);<br>
src = cairo_image_surface_create_for_data (data, format,<br>
width, height, stride);<br>
<br>
--<br>
1.7.9.5<br>
<br>
<br>
<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
</div></div></blockquote></div><br></div>