<div dir="ltr"><div>I've had patch doing exactly the same in my wip branch locally for some time now, so just:<br><br></div>Reviewed-by: Marek Chalupa <<a href="mailto:mchqwerty@gmail.com">mchqwerty@gmail.com</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 November 2014 at 02:18, Bryce Harrington <span dir="ltr"><<a href="mailto:bryce@osg.samsung.com" target="_blank">bryce@osg.samsung.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since this is an inlined function, move it to a common header file.<br>
<br>
Signed-off-by: Bryce Harrington <<a href="mailto:bryce@osg.samsung.com">bryce@osg.samsung.com</a>><br>
---<br>
tests/presentation-test.c | 11 -----------<br>
tests/weston-test-client-helper.c | 11 -----------<br>
tests/weston-test-client-helper.h | 11 +++++++++++<br>
3 files changed, 11 insertions(+), 22 deletions(-)<br>
<br>
diff --git a/tests/presentation-test.c b/tests/presentation-test.c<br>
index f97e5b3..59cca8e 100644<br>
--- a/tests/presentation-test.c<br>
+++ b/tests/presentation-test.c<br>
@@ -31,17 +31,6 @@<br>
#include "weston-test-client-helper.h"<br>
#include "presentation_timing-client-protocol.h"<br>
<br>
-static inline void *<br>
-xzalloc(size_t size)<br>
-{<br>
- void *p;<br>
-<br>
- p = calloc(1, size);<br>
- assert(p);<br>
-<br>
- return p;<br>
-}<br>
-<br>
static struct presentation *<br>
get_presentation(struct client *client)<br>
{<br>
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c<br>
index eadc29b..e374a96 100644<br>
--- a/tests/weston-test-client-helper.c<br>
+++ b/tests/weston-test-client-helper.c<br>
@@ -32,17 +32,6 @@<br>
#include "../shared/os-compatibility.h"<br>
#include "weston-test-client-helper.h"<br>
<br>
-static inline void *<br>
-xzalloc(size_t size)<br>
-{<br>
- void *p;<br>
-<br>
- p = calloc(1, size);<br>
- assert(p);<br>
-<br>
- return p;<br>
-}<br>
-<br>
int<br>
surface_contains(struct surface *surface, int x, int y)<br>
{<br>
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h<br>
index 684afc6..2cf3d8f 100644<br>
--- a/tests/weston-test-client-helper.h<br>
+++ b/tests/weston-test-client-helper.h<br>
@@ -101,6 +101,17 @@ struct surface {<br>
void *data;<br>
};<br>
<br>
+static inline void *<br>
+xzalloc(size_t size)<br>
+{<br>
+ void *p;<br>
+<br>
+ p = calloc(1, size);<br>
+ assert(p);<br>
+<br>
+ return p;<br>
+}<br>
+<br>
struct client *<br>
client_create(int x, int y, int width, int height);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.9.1<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div>