diff options
author | Werner Koch <wk@gnupg.org> | 2018-01-28 18:59:18 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-01-28 18:59:18 +0100 |
commit | 303310d05e708dd58dcf7b7d8e8634cd5085bc7e (patch) | |
tree | f81b9af432840317b81601f444afa0e4f03dc451 /g10/openfile.c | |
parent | agent: Fix sending connecting process uid to pinentry. (diff) | |
download | gnupg2-303310d05e708dd58dcf7b7d8e8634cd5085bc7e.tar.xz gnupg2-303310d05e708dd58dcf7b7d8e8634cd5085bc7e.zip |
gpg: Rename a misnomed arg in open_outfile.
* g10/openfile.c (open_outfile): Rename inp_fd to out_fd.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/openfile.c')
-rw-r--r-- | g10/openfile.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/g10/openfile.c b/g10/openfile.c index 78f4dbbcb..f4730da22 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -171,32 +171,34 @@ ask_outfile_name( const char *name, size_t namelen ) * 2 = use ".sig" * 3 = use ".rev" * - * If INP_FD is not -1 the function simply creates an IOBUF for that - * file descriptor and ignore INAME and MODE. Note that INP_FD won't - * be closed if the returned IOBUF is closed. With RESTRICTEDPERM a - * file will be created with mode 700 if possible. - */ + * With RESTRICTEDPERM a file will be created with mode 700 if + * possible. + * + * If OUT_FD is not -1 the function simply creates an IOBUF for that + * file descriptor and ignores INAME and MODE. Note that OUT_FD won't + * be closed if the returned IOBUF is closed. This is used for gpg's + * --server mode. */ int -open_outfile (int inp_fd, const char *iname, int mode, int restrictedperm, +open_outfile (int out_fd, const char *iname, int mode, int restrictedperm, iobuf_t *a) { int rc = 0; *a = NULL; - if (inp_fd != -1) + if (out_fd != -1) { char xname[64]; - *a = iobuf_fdopen_nc (inp_fd, "wb"); + *a = iobuf_fdopen_nc (out_fd, "wb"); if (!*a) { rc = gpg_error_from_syserror (); - snprintf (xname, sizeof xname, "[fd %d]", inp_fd); + snprintf (xname, sizeof xname, "[fd %d]", out_fd); log_error (_("can't open '%s': %s\n"), xname, gpg_strerror (rc)); } else if (opt.verbose) { - snprintf (xname, sizeof xname, "[fd %d]", inp_fd); + snprintf (xname, sizeof xname, "[fd %d]", out_fd); log_info (_("writing to '%s'\n"), xname); } } |