diff options
author | Neal H. Walfield <[email protected]> | 2015-08-13 14:09:15 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-08-20 12:16:22 +0000 |
commit | 8402815d8e0e04a44362968f88b3d484d2395402 (patch) | |
tree | f9a5fd9e9fc6cba353219f9be8ddb530c438f4e6 /g10/encrypt.c | |
parent | common/iobuf.c: Rename iobuf_flush and make it a static function. (diff) | |
download | gnupg-8402815d8e0e04a44362968f88b3d484d2395402.tar.gz gnupg-8402815d8e0e04a44362968f88b3d484d2395402.zip |
common/iobuf.h: Remove iobuf_open_fd_or_name.
* common/iobuf.h (iobuf_open_fd_or_name): Remove prototype. Replace
use with either iobuf_open or iobuf_fdopen_nc, as appropriate.
* common/iobuf.c (iobuf_open): Remove function.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
Diffstat (limited to 'g10/encrypt.c')
-rw-r--r-- | g10/encrypt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/g10/encrypt.c b/g10/encrypt.c index d5835d499..e2e1c05da 100644 --- a/g10/encrypt.c +++ b/g10/encrypt.c @@ -510,14 +510,17 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename, /* Prepare iobufs. */ #ifdef HAVE_W32_SYSTEM if (filefd == -1) - inp = iobuf_open_fd_or_name (GNUPG_INVALID_FD, filename, "rb"); + inp = iobuf_open (filename); else { inp = NULL; gpg_err_set_errno (ENOSYS); } #else - inp = iobuf_open_fd_or_name (filefd, filename, "rb"); + if (filefd == GNUPG_INVALID_FD) + inp = iobuf_open (filename); + else + inp = iobuf_fdopen_nc (FD2INT(filefd), "rb"); #endif if (inp) iobuf_ioctl (inp, IOBUF_IOCTL_NO_CACHE, 1, NULL); |