mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
common: Add additional memory utilities (xzalloc() etc.)
This commit is contained in:
parent
b89f7bfc0d
commit
cb40cdc36c
35 changed files with 193 additions and 167 deletions
|
|
@ -2,8 +2,10 @@
|
|||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "common/mem.h"
|
||||
#include "config/libinput.h"
|
||||
#include "config/rcxml.h"
|
||||
|
||||
static void
|
||||
libinput_category_init(struct libinput_category *l)
|
||||
{
|
||||
|
|
@ -36,10 +38,7 @@ get_device_type(const char *s)
|
|||
struct libinput_category *
|
||||
libinput_category_create(void)
|
||||
{
|
||||
struct libinput_category *l = calloc(1, sizeof(struct libinput_category));
|
||||
if (!l) {
|
||||
return NULL;
|
||||
}
|
||||
struct libinput_category *l = xzalloc(sizeof(struct libinput_category));
|
||||
libinput_category_init(l);
|
||||
wl_list_insert(&rc.libinput_categories, &l->link);
|
||||
return l;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue