}
static char *
-cf_parse_lookup(char *str, int *ptr, char **t)
+cf_parse_lookup(char *str, int *ptr, const char * const *t)
{
- char **n = t;
+ const char * const *n = t;
uns total_len = 0;
while (*n && strcasecmp(*n, str)) {
total_len += strlen(*n) + 2;
union cf_union {
struct cf_section *sec; // declaration of a section or a list
cf_parser *par; // parser function
- char **lookup; // NULL-terminated sequence of allowed strings for lookups
+ const char * const *lookup; // NULL-terminated sequence of allowed strings for lookups
struct cf_user_type *utype; // specification of the user-defined type
} u;
enum cf_class cls:16; // attribute class
CF_TYPE(struct fb_params),
CF_COMMIT(fbpar_cf_commit),
CF_ITEMS {
- CF_LOOKUP("Type", (int *)F(type), ((char *[]){"std", "direct", "mmap", NULL})),
+ CF_LOOKUP("Type", (int *)F(type), ((const char * const []){"std", "direct", "mmap", NULL})),
CF_UNS("BufSize", F(buffer_size)),
CF_UNS("KeepBackBuf", F(keep_back_buf)),
CF_UNS("ReadAhead", F(read_ahead)),
struct cf_section ipaccess_cf = {
CF_TYPE(struct ipaccess_entry),
CF_ITEMS {
- CF_LOOKUP("Mode", PTR_TO(struct ipaccess_entry, allow), ((char*[]) { "deny", "allow", NULL })),
+ CF_LOOKUP("Mode", PTR_TO(struct ipaccess_entry, allow), ((const char* const []) { "deny", "allow", NULL })),
CF_USER("IP", PTR_TO(struct ipaccess_entry, addr), &ip_addrmask_type),
CF_END
}