1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-09 23:39:51 +02:00

iobuf: Use a first-class enum.

* common/iobuf.h (enum iobuf_use): Name the IOBUF_OUTPUT, etc. enum.
(struct iobuf_struct): Change the field use's type to it.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
Neal H. Walfield 2015-09-01 22:17:23 +02:00
parent 8522cdc226
commit 24259d856b

View File

@ -118,7 +118,7 @@ typedef enum
IOBUF_IOCTL_FSYNC = 4 /* Uses ptrval. */ IOBUF_IOCTL_FSYNC = 4 /* Uses ptrval. */
} iobuf_ioctl_t; } iobuf_ioctl_t;
enum enum iobuf_use
{ {
/* Pipeline is in input mode. The data flows from the end to the /* Pipeline is in input mode. The data flows from the end to the
beginning. That is, when reading from the pipeline, the first beginning. That is, when reading from the pipeline, the first
@ -143,7 +143,7 @@ struct iobuf_struct
{ {
/* The type of filter. Either IOBUF_INPUT, IOBUF_OUTPUT or /* The type of filter. Either IOBUF_INPUT, IOBUF_OUTPUT or
IOBUF_TEMP. */ IOBUF_TEMP. */
int use; enum iobuf_use use;
/* nlimit can be changed using iobuf_set_limit. If non-zero, it is /* nlimit can be changed using iobuf_set_limit. If non-zero, it is
the number of additional bytes that can be read from the filter the number of additional bytes that can be read from the filter