mirror of
https://github.com/labwc/labwc.git
synced 2025-11-06 13:29:58 -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
|
|
@ -5,6 +5,7 @@
|
|||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/mem.h"
|
||||
#include "config/mousebind.h"
|
||||
#include "config/rcxml.h"
|
||||
|
||||
|
|
@ -108,7 +109,7 @@ mousebind_create(const char *context)
|
|||
wlr_log(WLR_ERROR, "mousebind context not specified");
|
||||
return NULL;
|
||||
}
|
||||
struct mousebind *m = calloc(1, sizeof(struct mousebind));
|
||||
struct mousebind *m = xzalloc(sizeof(struct mousebind));
|
||||
m->context = context_from_str(context);
|
||||
if (m->context != LAB_SSD_NONE) {
|
||||
wl_list_insert(rc.mousebinds.prev, &m->link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue