mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 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
|
|
@ -7,6 +7,7 @@
|
|||
* - keeping non-layer-shell xdg-popups outside the layers.c code
|
||||
*/
|
||||
|
||||
#include "common/mem.h"
|
||||
#include "labwc.h"
|
||||
#include "node.h"
|
||||
|
||||
|
|
@ -67,10 +68,7 @@ xdg_popup_create(struct view *view, struct wlr_xdg_popup *wlr_popup)
|
|||
return;
|
||||
}
|
||||
|
||||
struct xdg_popup *popup = calloc(1, sizeof(struct xdg_popup));
|
||||
if (!popup) {
|
||||
return;
|
||||
}
|
||||
struct xdg_popup *popup = xzalloc(sizeof(struct xdg_popup));
|
||||
|
||||
popup->parent_view = view;
|
||||
popup->wlr_popup = wlr_popup;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue