mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
sm: Use open_stream_nc for do_listkeys.
* sm/server.c (do_listkeys): Use open_stream_nc. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
69c1d81284
commit
ea625c74f0
@ -1014,14 +1014,14 @@ do_listkeys (assuan_context_t ctx, char *line, int mode)
|
|||||||
|
|
||||||
if (ctrl->server_local->list_to_output)
|
if (ctrl->server_local->list_to_output)
|
||||||
{
|
{
|
||||||
int outfd = translate_sys2libc_fd (assuan_get_output_fd (ctx), 1);
|
gnupg_fd_t outfd = assuan_get_output_fd (ctx);
|
||||||
|
|
||||||
if ( outfd == -1 )
|
if ( outfd == GNUPG_INVALID_FD )
|
||||||
{
|
{
|
||||||
free_strlist (list);
|
free_strlist (list);
|
||||||
return set_error (GPG_ERR_ASS_NO_OUTPUT, NULL);
|
return set_error (GPG_ERR_ASS_NO_OUTPUT, NULL);
|
||||||
}
|
}
|
||||||
fp = es_fdopen_nc (outfd, "w");
|
fp = open_stream_nc (outfd, "w");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
free_strlist (list);
|
free_strlist (list);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user