pm: memset when do pm_wakelock_init

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-06-22 14:46:51 +08:00 committed by Xiang Xiao
parent 959031ebca
commit f9849c7f60

View File

@ -266,11 +266,12 @@ void pm_wakelock_init(FAR struct pm_wakelock_s *wakelock,
DEBUGASSERT(domain >= 0 && domain < CONFIG_PM_NDOMAINS);
DEBUGASSERT(state < PM_COUNT);
memset(wakelock, 0, sizeof(*wakelock));
strlcpy(wakelock->name, name, sizeof(wakelock->name));
wakelock->domain = domain;
wakelock->state = state;
wakelock->count = 0;
}
/****************************************************************************