aboutsummaryrefslogtreecommitdiffstats
path: root/g10/openfile.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-07-18 02:54:16 +0000
committerNIIBE Yutaka <[email protected]>2023-07-18 02:54:16 +0000
commitb849c930e9b5056b705ab08285eb96aacbebbd23 (patch)
tree771335adffc2c48a97af962a3c1c10e2473877e6 /g10/openfile.c
parentgpg: Use gnupg_fd_t for iobuf_get_fd and is_secured_file. (diff)
downloadgnupg-b849c930e9b5056b705ab08285eb96aacbebbd23.tar.gz
gnupg-b849c930e9b5056b705ab08285eb96aacbebbd23.zip
common: Introduce FD_DBG to display gnupg_fd_t value.
* common/sysutils.h (FD_DBG): New. * agent/gpg-agent.c (check_nonce): Use FD_DBG. (do_start_connection_thread, start_connection_thread_ssh): Likewise. * common/iobuf.c (fd_cache_close, file_filter, do_open): Likewise. (do_iobuf_fdopen): Likewise. * dirmngr/dirmngr.c (check_nonce, start_connection_thread) (handle_connections): Likewise. * dirmngr/http.c (_my_socket_new, _my_socket_ref): Likewise. (_my_socket_unref): Likewise. * g10/decrypt.c (decrypt_message_fd): Likewise. * g10/encrypt.c (encrypt_crypt): Likewise. * g10/openfile.c (open_outfile): Likewise. * g10/plaintext.c (get_output_file, hash_datafile_by_fd): Likewise. * g10/verify.c (gpg_verify): Likewise. * kbx/keyboxd.c (check_nonce, do_start_connection_thread): Likewise. * scd/scdaemon.c (start_connection_thread): Likewise. (handle_connections): Likewise. * sm/gpgsm.c (open_es_fread, open_es_fwrite): Likewise. * tpm2d/tpm2daemon.c (start_connection_thread): Likewise. (handle_connections): Likewise. -- GnuPG-bug-id: 6597 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'g10/openfile.c')
-rw-r--r--g10/openfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/openfile.c b/g10/openfile.c
index 80c33f094..01f323399 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -193,12 +193,12 @@ open_outfile (gnupg_fd_t out_fd, const char *iname, int mode,
if (!*a)
{
rc = gpg_error_from_syserror ();
- snprintf (xname, sizeof xname, "[fd %d]", (int)(intptr_t)out_fd);
+ snprintf (xname, sizeof xname, "[fd %d]", FD_DBG (out_fd));
log_error (_("can't open '%s': %s\n"), xname, gpg_strerror (rc));
}
else if (opt.verbose)
{
- snprintf (xname, sizeof xname, "[fd %d]", (int)(intptr_t)out_fd);
+ snprintf (xname, sizeof xname, "[fd %d]", FD_DBG (out_fd));
log_info (_("writing to '%s'\n"), xname);
}
}