diff options
Diffstat (limited to 'common/iobuf.c')
-rw-r--r-- | common/iobuf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index e3ea0b4cb..60e50d677 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -1262,22 +1262,22 @@ iobuf_is_pipe_filename (const char *fname) /* Either open the file specified by the file descriptor FD or - if FD - is GNUPG_INVALID_FD - the file with name FNAME. As of now MODE is - assumed to be "rb" if FNAME is used. In contrast to iobuf_fdopen - the fiel descriptor FD will not be closed during an iobuf_close. */ + is -1, the file with name FNAME. As of now MODE is assumed to be + "rb" if FNAME is used. In contrast to iobuf_fdopen the file + descriptor FD will not be closed during an iobuf_close. */ iobuf_t -iobuf_open_fd_or_name (gnupg_fd_t fd, const char *fname, const char *mode) +iobuf_open_fd_or_name (int fd, const char *fname, const char *mode) { iobuf_t a; - if (fd == GNUPG_INVALID_FD) + if (fd == -1) a = iobuf_open (fname); else { - gnupg_fd_t fd2; + int fd2; fd2 = dup (fd); - if (fd2 == GNUPG_INVALID_FD) + if (fd2 == -1) a = NULL; else a = iobuf_fdopen (fd2, mode); |