Signed-off-by: Bryce Harrington <b.harring...@samsung.com> --- clients/window.c | 8 ++++++++ clients/window.h | 2 ++ 2 files changed, 10 insertions(+)
diff --git a/clients/window.c b/clients/window.c index f12ce39..cfc1260 100644 --- a/clients/window.c +++ b/clients/window.c @@ -5647,3 +5647,11 @@ xrealloc(char *p, size_t s) { return fail_on_null(realloc(p, s)); } + +void * +xcalloc(size_t n, size_t s) +{ + if (n == 0 || s == 0) + return NULL; + return fail_on_null(calloc(n, s)); +} diff --git a/clients/window.h b/clients/window.h index 4e4ccc1..40989ba 100644 --- a/clients/window.h +++ b/clients/window.h @@ -65,6 +65,8 @@ char * xstrdup(const char *s); void * xrealloc(char *p, size_t s); +void * +xcalloc(size_t n, size_t s); struct display * display_create(int *argc, char *argv[]); -- 1.7.9.5 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel