diff options
author | Neal H. Walfield <[email protected]> | 2015-08-09 14:53:51 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-08-20 12:16:16 +0000 |
commit | 12fc56bcb51d984a6e86fc1eb7952f9976c67043 (patch) | |
tree | 1007a2b33197caab1ef83918718a3dc726b29496 /common/iobuf.h | |
parent | common/iobuf.c: Remove dead code (directfp). (diff) | |
download | gnupg-12fc56bcb51d984a6e86fc1eb7952f9976c67043.tar.gz gnupg-12fc56bcb51d984a6e86fc1eb7952f9976c67043.zip |
common/iobuf.h: Clarify semantics of nofast. Simplify implementation.
* common/iobuf.h (struct iobuf_struct): Clarify semantics of nofast.
Simplify use of nofast to implement just these semantics.
--
Signed-off-by: Neal H. Walfield <[email protected]>.
Diffstat (limited to 'common/iobuf.h')
-rw-r--r-- | common/iobuf.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/iobuf.h b/common/iobuf.h index c6877e0fa..a69380959 100644 --- a/common/iobuf.h +++ b/common/iobuf.h @@ -75,7 +75,11 @@ struct iobuf_struct off_t nlimit; off_t nbytes; /* Used together with nlimit. */ off_t ntotal; /* Total bytes read (position of stream). */ - int nofast; /* Used by the iobuf_get (). */ + + /* Whether we need to read from the filter one byte at a time or + whether we can do bulk reads. We need to read one byte at a time + if a limit (set via iobuf_set_limit) is active. */ + int nofast; struct { size_t size; /* Allocated size */ |