2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Remove usage of deprecated ATOMIC_VAR_INIT() macro

The C17 standard deprecated ATOMIC_VAR_INIT() macro (see [1]).  Follow
the suite and remove the ATOMIC_VAR_INIT() usage in favor of simple
assignment of the value as this is what all supported stdatomic.h
implementations do anyway:

  * MacOSX.plaform: #define ATOMIC_VAR_INIT(__v) {__v}
  * Gcc stdatomic.h: #define ATOMIC_VAR_INIT(VALUE)	(VALUE)

1. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1138r0.pdf
This commit is contained in:
Ondřej Surý
2022-03-08 23:55:10 +01:00
parent 0b68596c45
commit f251d69eba
18 changed files with 62 additions and 65 deletions

View File

@@ -115,7 +115,7 @@
#define NS_CLIENT_DROPPORT 1
#endif /* ifndef NS_CLIENT_DROPPORT */
atomic_uint_fast64_t ns_client_requests = ATOMIC_VAR_INIT(0);
atomic_uint_fast64_t ns_client_requests = 0;
static void
clientmgr_attach(ns_clientmgr_t *source, ns_clientmgr_t **targetp);