aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/iobuf.c6
-rw-r--r--common/iobuf.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/common/iobuf.c b/common/iobuf.c
index 3c5dc800c..f70ab9879 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -2641,20 +2641,20 @@ iobuf_get_filelength (iobuf_t a)
}
-int
+gnupg_fd_t
iobuf_get_fd (iobuf_t a)
{
for (; a->chain; a = a->chain)
;
if (a->filter != file_filter)
- return -1;
+ return GNUPG_INVALID_FD;
{
file_filter_ctx_t *b = a->filter_ov;
gnupg_fd_t fp = b->fp;
- return FD2INT (fp);
+ return fp;
}
}
diff --git a/common/iobuf.h b/common/iobuf.h
index 4a723908d..4354c718d 100644
--- a/common/iobuf.h
+++ b/common/iobuf.h
@@ -590,7 +590,7 @@ uint64_t iobuf_get_filelength (iobuf_t a);
/* Return the file descriptor designating the underlying file. This
only works with file_filter based pipelines. */
-int iobuf_get_fd (iobuf_t a);
+gnupg_fd_t iobuf_get_fd (iobuf_t a);
/* Return the real filename, if available. This only supports
pipelines that end in file filters. Returns NULL if not