diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-10-22 15:21:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-10-22 15:21:26 +0000 |
commit | 74156a5ec5fe13c01a701bc613c768473dcd735a (patch) | |
tree | bd10928ab5203dc49b43e08b3f0a4a7a865d3650 /lib/libc/stdlib | |
parent | 80eb04ad9091f3e41e260bb3c2722311eedc6229 (diff) |
In __cxa_atexit(), there is no need to initialize local pointer before
the lock, when it is correctly initialized after the lock
ok otto millert
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r-- | lib/libc/stdlib/atexit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/atexit.c b/lib/libc/stdlib/atexit.c index ea9dd129c1f..81d2dc2476c 100644 --- a/lib/libc/stdlib/atexit.c +++ b/lib/libc/stdlib/atexit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atexit.c,v 1.27 2017/12/16 20:06:56 guenther Exp $ */ +/* $OpenBSD: atexit.c,v 1.28 2022/10/22 15:21:25 deraadt Exp $ */ /* * Copyright (c) 2002 Daniel Hartmeier * All rights reserved. @@ -67,7 +67,7 @@ struct atfork_listhead _atfork_list = TAILQ_HEAD_INITIALIZER(_atfork_list); int __cxa_atexit(void (*func)(void *), void *arg, void *dso) { - struct atexit *p = __atexit; + struct atexit *p; struct atexit_fn *fnp; int pgsize = getpagesize(); int ret = -1; |