From: Jeremy Harris Date: Fri, 20 Jun 2014 12:40:24 +0000 (+0100) Subject: Use enum for var_entry type X-Git-Tag: exim-4_83_RC3~6 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/7e75538e9b2d735ebe7a2832482353861ec4dff0?ds=sidebyside Use enum for var_entry type --- diff --git a/src/src/expand.c b/src/src/expand.c index b02ea30a2..9d73803a5 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -348,25 +348,9 @@ enum { }; -/* Type for main variable table */ - -typedef struct { - const char *name; - int type; - void *value; -} var_entry; - -/* Type for entries pointing to address/length pairs. Not currently -in use. */ - -typedef struct { - uschar **address; - int *length; -} alblock; - /* Types of table entry */ -enum { +enum vtypes { vtype_int, /* value is address of int */ vtype_filter_int, /* ditto, but recognized only when filtering */ vtype_ino, /* value is address of ino_t (not always an int) */ @@ -399,7 +383,23 @@ enum { #ifndef DISABLE_DKIM ,vtype_dkim /* Lookup of value in DKIM signature */ #endif - }; +}; + +/* Type for main variable table */ + +typedef struct { + const char *name; + enum vtypes type; + void *value; +} var_entry; + +/* Type for entries pointing to address/length pairs. Not currently +in use. */ + +typedef struct { + uschar **address; + int *length; +} alblock; static uschar * fn_recipients(void);