diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-17 00:51:24 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-17 00:52:10 +0100 |
commit | 23e096cc60eb73f24b812e4ceba7c4c2c141e2db (patch) | |
tree | cb29a125f9e1028d51a12182e261aa7d493ff0d5 /src/basic/async.c | |
parent | b16fee15ff0dbaa8140beb62dc27f3a686c70258 (diff) |
tree-wide: make macros for converting fds to pointers and back generic and use them everywhere
Diffstat (limited to 'src/basic/async.c')
-rw-r--r-- | src/basic/async.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/async.c b/src/basic/async.c index c3135f0efe..cfc5d224e1 100644 --- a/src/basic/async.c +++ b/src/basic/async.c @@ -68,7 +68,7 @@ int asynchronous_sync(void) { } static void *close_thread(void *p) { - assert_se(close_nointr(PTR_TO_INT(p)) != -EBADF); + assert_se(close_nointr(PTR_TO_FD(p)) != -EBADF); return NULL; } @@ -84,7 +84,7 @@ int asynchronous_close(int fd) { if (fd >= 0) { PROTECT_ERRNO; - r = asynchronous_job(close_thread, INT_TO_PTR(fd)); + r = asynchronous_job(close_thread, FD_TO_PTR(fd)); if (r < 0) assert_se(close_nointr(fd) != -EBADF); } |