Message ID | 1423706279-12170-2-git-send-email-mikey@neuling.org |
---|---|
State | Accepted |
Headers | show |
diff --git a/include/lock.h b/include/lock.h index 823160a..0ac943d 100644 --- a/include/lock.h +++ b/include/lock.h @@ -60,8 +60,7 @@ extern bool bust_locks; static inline void init_lock(struct lock *l) { - l->lock_val = 0; - l->in_con_path = false; + *l = (struct lock)LOCK_UNLOCKED; } extern bool __try_lock(struct lock *l);
Avoids duplication of init values. Signed-off-by: Michael Neuling <mikey@neuling.org> --- include/lock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)