mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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
|
@ -144,16 +144,7 @@ prepare_outstream (ctrl_t ctrl)
|
|||
return 0; /* No Output command active. */
|
||||
else
|
||||
{
|
||||
es_syshd_t syshd;
|
||||
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
syshd.type = ES_SYSHD_HANDLE;
|
||||
syshd.u.handle = fd;
|
||||
#else
|
||||
syshd.type = ES_SYSHD_FD;
|
||||
syshd.u.fd = fd;
|
||||
#endif
|
||||
out_fp = es_sysopen_nc (&syshd, "w");
|
||||
out_fp = open_stream_nc (fd, "w");
|
||||
if (!out_fp)
|
||||
return gpg_err_code_from_syserror ();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue