diff options
author | 2019-12-25 00:35:29 +0000 | |
---|---|---|
committer | 2019-12-25 00:35:29 +0000 | |
commit | 9fb1141b1b95e3d913316b057c650aba03b1114d (patch) | |
tree | 62ee83755bcfcbc47503e96e74bd13128c9dd526 | |
parent | timeout(9): new flag: TIMEOUT_SCHEDULED, new statistic: tos_scheduled (diff) | |
download | wireguard-openbsd-9fb1141b1b95e3d913316b057c650aba03b1114d.tar.xz wireguard-openbsd-9fb1141b1b95e3d913316b057c650aba03b1114d.zip |
TIMEOUT_INITIALIZER(9): C99 initializers
-rw-r--r-- | sys/sys/timeout.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/sys/timeout.h b/sys/sys/timeout.h index c72016b9b29..8d78745f73a 100644 --- a/sys/sys/timeout.h +++ b/sys/sys/timeout.h @@ -1,4 +1,4 @@ -/* $OpenBSD: timeout.h,v 1.33 2019/12/25 00:15:36 cheloha Exp $ */ +/* $OpenBSD: timeout.h,v 1.34 2019/12/25 00:35:29 cheloha Exp $ */ /* * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -101,8 +101,13 @@ int timeout_sysctl(void *, size_t *, void *, size_t); #define timeout_initialized(to) ((to)->to_flags & TIMEOUT_INITIALIZED) #define timeout_triggered(to) ((to)->to_flags & TIMEOUT_TRIGGERED) -#define TIMEOUT_INITIALIZER(_f, _a) \ - { { NULL, NULL }, (_f), (_a), 0, TIMEOUT_INITIALIZED } +#define TIMEOUT_INITIALIZER(_f, _a) { \ + .to_list = { NULL, NULL }, \ + .to_func = (_f), \ + .to_arg = (_a), \ + .to_time = 0, \ + .to_flags = TIMEOUT_INITIALIZED \ +} struct bintime; |