aboutsummaryrefslogtreecommitdiffstats
path: root/common/iobuf.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-07-14 06:52:08 +0000
committerNIIBE Yutaka <[email protected]>2023-07-14 06:52:08 +0000
commitee9e3578ce30892ce86276819f0eedf8fb3f6e47 (patch)
tree7e3d77db4a7fbe497cba74373e1e63dd1a86d081 /common/iobuf.c
parentgpg: Use is_secured_filename before opening the file. (diff)
downloadgnupg-ee9e3578ce30892ce86276819f0eedf8fb3f6e47.tar.gz
gnupg-ee9e3578ce30892ce86276819f0eedf8fb3f6e47.zip
gpg: Use gnupg_fd_t for iobuf_get_fd and is_secured_file.
* common/iobuf.c (iobuf_get_fd): Return type is now gnupg_fd_t. * common/iobuf.h (iobuf_get_fd): Fix the return type. * g10/misc.c (is_secured_file): Argument is now gnupg_fd_t. * g10/main.h (is_secured_file): Fix the argument type. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'common/iobuf.c')
-rw-r--r--common/iobuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/iobuf.c b/common/iobuf.c
index 3c5dc800c..f70ab9879 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -2641,20 +2641,20 @@ iobuf_get_filelength (iobuf_t a)
}
-int
+gnupg_fd_t
iobuf_get_fd (iobuf_t a)
{
for (; a->chain; a = a->chain)
;
if (a->filter != file_filter)
- return -1;
+ return GNUPG_INVALID_FD;
{
file_filter_ctx_t *b = a->filter_ov;
gnupg_fd_t fp = b->fp;
- return FD2INT (fp);
+ return fp;
}
}