aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-07-13 04:51:26 +0000
committerNIIBE Yutaka <[email protected]>2023-07-13 04:53:49 +0000
commitea625c74f00a81245a34f5330e5d92790ea84f5d (patch)
tree034b9cccc591d5e3773f758ac3915b8923019b68
parentsm: Use gnupg_fd_t and open_stream_nc for assuan_get_input_fd. (diff)
downloadgnupg-ea625c74f00a81245a34f5330e5d92790ea84f5d.tar.gz
gnupg-ea625c74f00a81245a34f5330e5d92790ea84f5d.zip
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 <[email protected]>
-rw-r--r--sm/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sm/server.c b/sm/server.c
index bb048a62a..693932c2e 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -1014,14 +1014,14 @@ do_listkeys (assuan_context_t ctx, char *line, int mode)
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);
return set_error (GPG_ERR_ASS_NO_OUTPUT, NULL);
}
- fp = es_fdopen_nc (outfd, "w");
+ fp = open_stream_nc (outfd, "w");
if (!fp)
{
free_strlist (list);