summaryrefslogtreecommitdiff
path: root/include/internal
diff options
context:
space:
mode:
authorDmitry Chestnykh <dm.chestnykh@gmail.com>2024-02-26 13:21:25 +0300
committerWaldemar Brodkorb <wbx@openadk.org>2024-02-26 11:28:42 +0100
commitfb800e73a9c81a299f55de7a3aba4a0c3ab074e0 (patch)
treeddce3ecfc8ca988ccf6f23fd0c01e79be111e2e8 /include/internal
parentf9df8bfdf6645c2727367da113a7e1937b00eb80 (diff)
Refactor `ts32_struct` and `TO_ITS64_P`.
- Renamed `ts32_struct` to `__ts32_struct` like `__ts64_struct` and moved its definition to the header. - Removed extra space from TO_ITS64_P() macro. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/time64_helpers.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/internal/time64_helpers.h b/include/internal/time64_helpers.h
index 7a78e8388..0f912f4bf 100644
--- a/include/internal/time64_helpers.h
+++ b/include/internal/time64_helpers.h
@@ -5,6 +5,11 @@
#include <time.h>
#include <stddef.h>
+struct __ts32_struct {
+ __S32_TYPE tv_sec;
+ __S32_TYPE tv_nsec;
+};
+
struct __ts64_struct {
__S64_TYPE tv_sec;
__S64_TYPE tv_nsec;
@@ -21,7 +26,7 @@ struct __its64_struct {
__S64_TYPE value_tv_nsec;
};
-#define TO_ITS64_P(__its) (((struct itimerspec *)(__its)) ? \
+#define TO_ITS64_P(__its) (((struct itimerspec *)(__its)) ? \
(&(struct __its64_struct) {.interval_tv_sec = ((struct itimerspec *)(__its))->it_interval.tv_sec, \
.interval_tv_nsec = ((struct itimerspec *)(__its))->it_interval.tv_nsec, \
.value_tv_sec = ((struct itimerspec *)(__its))->it_value.tv_sec, \