multi-resource: Don't include non-existing xmalloc.h
It existed on my local disk, of course. Just copy over xzmalloc().
This commit is contained in:
@@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
#include "../shared/os-compatibility.h"
|
#include "../shared/os-compatibility.h"
|
||||||
#include "xmalloc.h"
|
|
||||||
|
|
||||||
struct device {
|
struct device {
|
||||||
enum { KEYBOARD, POINTER } type;
|
enum { KEYBOARD, POINTER } type;
|
||||||
@@ -82,6 +81,20 @@ static const struct wl_buffer_listener buffer_listener = {
|
|||||||
buffer_release
|
buffer_release
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline void *
|
||||||
|
xzalloc(size_t s)
|
||||||
|
{
|
||||||
|
void *p;
|
||||||
|
|
||||||
|
p = calloc(1, s);
|
||||||
|
if (p == NULL) {
|
||||||
|
fprintf(stderr, "%s: out of memory\n", program_invocation_short_name);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
attach_buffer(struct window *window, int width, int height)
|
attach_buffer(struct window *window, int width, int height)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user