pm: memset when do pm_wakelock_init
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
959031ebca
commit
f9849c7f60
@ -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;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user