]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/io-util.c
time-util: add macros around timespec_store() that operates on compund literal alloca...
[thirdparty/systemd.git] / src / basic / io-util.c
index 783ca1309dede27c8f2245cc34c542f50ceeb1a4..a591a75c3741ad70afc5050bad593271059eb90a 100644 (file)
@@ -159,7 +159,6 @@ int pipe_eof(int fd) {
 }
 
 int ppoll_usec(struct pollfd *fds, size_t nfds, usec_t timeout) {
-        struct timespec ts;
         int r;
 
         assert(fds || nfds == 0);
@@ -167,7 +166,7 @@ int ppoll_usec(struct pollfd *fds, size_t nfds, usec_t timeout) {
         if (nfds == 0)
                 return 0;
 
-        r = ppoll(fds, nfds, timeout == USEC_INFINITY ? NULL : timespec_store(&ts, timeout), NULL);
+        r = ppoll(fds, nfds, timeout == USEC_INFINITY ? NULL : TIMESPEC_STORE(timeout), NULL);
         if (r < 0)
                 return -errno;
         if (r == 0)