aboutsummaryrefslogtreecommitdiffstats
path: root/g10/decrypt.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-07-07 06:07:34 +0000
committerNIIBE Yutaka <[email protected]>2023-07-10 02:22:43 +0000
commit37343db08f4aaa36a0f58d2ecf50e7fbba4cacd7 (patch)
treebe0f1034812739c231bd3871ceeb36ca8a4009cf /g10/decrypt.c
parentcommon:w32: Fix gnupg_w32_set_errno. (diff)
downloadgnupg-37343db08f4aaa36a0f58d2ecf50e7fbba4cacd7.tar.gz
gnupg-37343db08f4aaa36a0f58d2ecf50e7fbba4cacd7.zip
common,gpg,kbx: Factor out open_stream_nc.
* common/sysutils.h (open_stream_nc): New. * common/sysutils.c (open_stream_nc): New. * g10/decrypt.c (decrypt_message_fd): Use open_stream_nc. * g10/server.c (cmd_verify): Likewise. * kbx/kbxserver.c (prepare_outstream): Likewise. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/decrypt.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/g10/decrypt.c b/g10/decrypt.c
index e000ac478..64ba0b7f1 100644
--- a/g10/decrypt.c
+++ b/g10/decrypt.c
@@ -114,7 +114,6 @@ decrypt_message_fd (ctrl_t ctrl, gnupg_fd_t input_fd,
IOBUF fp;
armor_filter_context_t *afx = NULL;
progress_filter_context_t *pfx;
- es_syshd_t syshd;
if (opt.outfp)
return gpg_error (GPG_ERR_BUG);
@@ -140,14 +139,7 @@ decrypt_message_fd (ctrl_t ctrl, gnupg_fd_t input_fd,
return err;
}
-#ifdef HAVE_W32_SYSTEM
- syshd.type = ES_SYSHD_HANDLE;
- syshd.u.handle = output_fd;
-#else
- syshd.type = ES_SYSHD_FD;
- syshd.u.fd = output_fd;
-#endif
- opt.outfp = es_sysopen_nc (&syshd, "w");
+ opt.outfp = open_stream_nc (output_fd, "w");
if (!opt.outfp)
{
char xname[64];