mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <gniibe@fsij.org>
This commit is contained in:
parent
5bc949d230
commit
37343db08f
5 changed files with 23 additions and 29 deletions
11
g10/server.c
11
g10/server.c
|
@ -388,16 +388,7 @@ cmd_verify (assuan_context_t ctx, char *line)
|
|||
|
||||
if (out_fd != GNUPG_INVALID_FD)
|
||||
{
|
||||
es_syshd_t syshd;
|
||||
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
syshd.type = ES_SYSHD_HANDLE;
|
||||
syshd.u.handle = out_fd;
|
||||
#else
|
||||
syshd.type = ES_SYSHD_FD;
|
||||
syshd.u.fd = out_fd;
|
||||
#endif
|
||||
out_fp = es_sysopen_nc (&syshd, "w");
|
||||
out_fp = open_stream_nc (fd, "w");
|
||||
if (!out_fp)
|
||||
return set_error (gpg_err_code_from_syserror (), "fdopen() failed");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue