aboutsummaryrefslogtreecommitdiff
path: root/util/addon.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/addon.c')
-rw-r--r--util/addon.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/addon.c b/util/addon.c
index 395a8df6..c9b373a7 100644
--- a/util/addon.c
+++ b/util/addon.c
@@ -1,9 +1,11 @@
#include <assert.h>
#include <stdlib.h>
+#include <string.h>
#include <wayland-server-core.h>
#include <wlr/util/addon.h>
void wlr_addon_set_init(struct wlr_addon_set *set) {
+ memset(set, 0, sizeof(*set));
wl_list_init(&set->addons);
}
@@ -18,6 +20,7 @@ void wlr_addon_set_finish(struct wlr_addon_set *set) {
void wlr_addon_init(struct wlr_addon *addon, struct wlr_addon_set *set,
const void *owner, const struct wlr_addon_interface *impl) {
assert(owner && impl);
+ memset(addon, 0, sizeof(*addon));
struct wlr_addon *iter;
wl_list_for_each(iter, &set->addons, link) {
if (iter->owner == addon->owner && iter->impl == addon->impl) {