From 8f585362c1cc9ce84ef0d6c27ca591dac28daaf0 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sun, 18 Sep 2022 17:30:12 -0400 Subject: [PATCH] common: Expand comment for znew/znew_n() --- include/common/mem.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/common/mem.h b/include/common/mem.h index 577970d1..a38f7fde 100644 --- a/include/common/mem.h +++ b/include/common/mem.h @@ -13,7 +13,11 @@ void *xzalloc(size_t size); /* * Type-safe macros in the style of C++ new/new[]. - * may be either a type name or value expression. + * Both allocate zero-filled memory for object(s) the same size as + * , which may be either a type name or value expression. + * + * znew() allocates space for one object. + * znew_n() allocates space for an array of objects. * * Examples: * struct wlr_box *box = znew(*box);