From 68d3a73ea78769280650a839c11c6f34ae39dadc Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Wed, 5 Jul 2023 09:36:00 +0900 Subject: gpg: Use gnupg_fd_t for open_outfile. * g10/main.h (open_outfile): Use gnupg_fd_t instead of int. * g10/openfile.c (open_outfile): Likewise. Use GNUPG_INVALID_FD. * g10/dearmor.c (dearmor_file, enarmor_file): Follow the change. * g10/encrypt.c (encrypt_simple): Likewise. * g10/export.c (do_export): Likewise. * g10/revoke.c (gen_desig_revoke, create_revocation): Likewise. * g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Likewise. -- GnuPG-bug-id: 6580 Signed-off-by: NIIBE Yutaka --- g10/sign.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'g10/sign.c') diff --git a/g10/sign.c b/g10/sign.c index d6ab396af..5588557c8 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -1113,7 +1113,7 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr, else if (opt.verbose) log_info (_("writing to '%s'\n"), outfile); } - else if ((rc = open_outfile (-1, fname, + else if ((rc = open_outfile (GNUPG_INVALID_FD, fname, opt.armor? 1 : detached? 2 : 0, 0, &out))) { goto leave; @@ -1459,7 +1459,7 @@ clearsign_file (ctrl_t ctrl, log_info (_("writing to '%s'\n"), outfile); } - else if ((rc = open_outfile (-1, fname, 1, 0, &out))) + else if ((rc = open_outfile (GNUPG_INVALID_FD, fname, 1, 0, &out))) { goto leave; } @@ -1637,7 +1637,7 @@ sign_symencrypt_file (ctrl_t ctrl, const char *fname, strlist_t locusr) /**/ : "CFB"); /* Now create the outfile. */ - rc = open_outfile (-1, fname, opt.armor? 1:0, 0, &out); + rc = open_outfile (GNUPG_INVALID_FD, fname, opt.armor? 1:0, 0, &out); if (rc) goto leave; -- cgit v1.2.3