summaryrefslogtreecommitdiffstats
path: root/lib/timespec.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/timespec.h')
-rw-r--r--lib/timespec.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/timespec.h b/lib/timespec.h
index 0bdfd76..69ce348 100644
--- a/lib/timespec.h
+++ b/lib/timespec.h
@@ -1,6 +1,6 @@
/* timespec -- System time interface
- Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2023 Free Software
+ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -55,10 +55,7 @@ enum { LOG10_TIMESPEC_RESOLUTION = LOG10_TIMESPEC_HZ };
_GL_TIMESPEC_INLINE struct timespec
make_timespec (time_t s, long int ns)
{
- struct timespec r;
- r.tv_sec = s;
- r.tv_nsec = ns;
- return r;
+ return (struct timespec) { .tv_sec = s, .tv_nsec = ns };
}
/* Return negative, zero, positive if A < B, A == B, A > B, respectively. */