summaryrefslogtreecommitdiff
path: root/lib/timespec.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/timespec.h')
-rw-r--r--lib/timespec.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/timespec.h b/lib/timespec.h
index 0bdfd76ef7..e94da75def 100644
--- a/lib/timespec.h
+++ b/lib/timespec.h
@@ -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. */