summaryrefslogtreecommitdiffstats
path: root/dirmngr
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2023-07-18 07:43:36 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2023-07-18 07:43:36 +0200
commitea1935252e287b63f04c6d460cfb85e4e5efe379 (patch)
tree926cd14224f7058027cebe985f354868f66f8969 /dirmngr
parentcommon,w32: Fix FD2INT macro. (diff)
downloadgnupg2-ea1935252e287b63f04c6d460cfb85e4e5efe379.tar.xz
gnupg2-ea1935252e287b63f04c6d460cfb85e4e5efe379.zip
commond: Introduce FD2NUM to express conversion to number of fds.
* common/sysutils.h (FD2NUM): New. * agent/call-pinentry.c (watch_sock): Use FD2NUM. * agent/gpg-agent.c (handle_connections): Likewise. * dirmngr/dirmngr.c (handle_connections): Likewise. * dirmngr/http.c (connect_with_timeout): Likewise. * kbx/keyboxd.c (handle_connections): Likewise. * scd/scdaemon.c (handle_connections): Likewise. * tpm2d/tpm2daemon.c (handle_connections): Likewise. -- GnuPG-bug-id: 6598 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'dirmngr')
-rw-r--r--dirmngr/dirmngr.c2
-rw-r--r--dirmngr/http.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 8b0fefc64..57f515b40 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -2377,7 +2377,7 @@ handle_connections (assuan_fd_t listen_fd)
to full second. */
FD_ZERO (&fdset);
FD_SET (FD2INT (listen_fd), &fdset);
- nfd = FD2INT (listen_fd);
+ nfd = FD2NUM (listen_fd);
if (my_inotify_fd != -1)
{
FD_SET (my_inotify_fd, &fdset);
diff --git a/dirmngr/http.c b/dirmngr/http.c
index 2345ce8c1..a7fd6ec26 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2906,7 +2906,7 @@ connect_with_timeout (assuan_fd_t sock,
tval.tv_sec = timeout / 1000;
tval.tv_usec = (timeout % 1000) * 1000;
- n = my_select (FD2INT(sock)+1, &rset, &wset, NULL, &tval);
+ n = my_select (FD2NUM(sock)+1, &rset, &wset, NULL, &tval);
if (n < 0)
{
err = gpg_err_make (default_errsource, gpg_err_code_from_syserror ());