1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

common: Change iobuf_fdopen argument type to gnupg_fd_t.

* common/iobuf.h (iobuf_fdopen): Use gnupg_fd_t.
* common/iobuf.c (iobuf_fdopen): Use gnupg_fd_t.
(iobuf_sockopen): Call do_iobuf_fdopen.

--

GnuPG-bug-id: 6580
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-07-11 11:21:05 +09:00
parent 250733c0d8
commit 16d135c396
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
2 changed files with 3 additions and 4 deletions

View File

@ -1522,9 +1522,8 @@ do_iobuf_fdopen (gnupg_fd_t fp, const char *mode, int keep_open)
iobuf_t iobuf_t
iobuf_fdopen (int fd, const char *mode) iobuf_fdopen (gnupg_fd_t fp, const char *mode)
{ {
gnupg_fd_t fp = INT2FD (fd);
return do_iobuf_fdopen (fp, mode, 0); return do_iobuf_fdopen (fp, mode, 0);
} }
@ -1583,7 +1582,7 @@ iobuf_sockopen (int fd, const char *mode)
log_debug ("iobuf-%d.%d: sockopen '%s'\n", a->no, a->subno, scx->fname); log_debug ("iobuf-%d.%d: sockopen '%s'\n", a->no, a->subno, scx->fname);
iobuf_ioctl (a, IOBUF_IOCTL_NO_CACHE, 1, NULL); iobuf_ioctl (a, IOBUF_IOCTL_NO_CACHE, 1, NULL);
#else #else
a = iobuf_fdopen (fd, mode); a = do_iobuf_fdopen (fd, mode, 0);
#endif #endif
return a; return a;
} }

View File

@ -333,7 +333,7 @@ iobuf_t iobuf_openrw (const char *fname);
creates an input filter. Note: MODE must reflect the file creates an input filter. Note: MODE must reflect the file
descriptors actual mode! When the filter is destroyed, the file descriptors actual mode! When the filter is destroyed, the file
descriptor is closed. */ descriptor is closed. */
iobuf_t iobuf_fdopen (int fd, const char *mode); iobuf_t iobuf_fdopen (gnupg_fd_t fd, const char *mode);
/* Like iobuf_fdopen, but doesn't close the file descriptor when the /* Like iobuf_fdopen, but doesn't close the file descriptor when the
filter is destroyed. */ filter is destroyed. */