aboutsummaryrefslogtreecommitdiffstats
path: root/src/config/lexparse.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-08-29 16:30:15 +0000
committerLaurent Bercot <ska@appnovation.com>2023-08-29 16:30:15 +0000
commit0691bcbd11897694a604f99fa58af6b4286c7195 (patch)
treea5259e0b1118c5d294cb4bfb77fa3d25fed4d121 /src/config/lexparse.c
parente6ada0b74352f77124a682d98c6d842fd5c44b45 (diff)
downloadtipidee-0691bcbd11897694a604f99fa58af6b4286c7195.tar.gz
More examples, some fixes, some more doc
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/config/lexparse.c')
-rw-r--r--src/config/lexparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/lexparse.c b/src/config/lexparse.c
index a7ed5b2..da9d7f5 100644
--- a/src/config/lexparse.c
+++ b/src/config/lexparse.c
@@ -99,7 +99,7 @@ static inline void parse_global (char const *s, size_t const *word, size_t n, md
{ .name = "verbosity", .key = "G:verbosity", .type = 0 },
{ .name = "write_timeout", .key = "G:write_timeout", .type = 0 }
} ;
- struct globalkey_s *gl ;
+ struct globalkey_s const *gl ;
if (n < 2)
strerr_dief8x(1, "too ", "few", " arguments to directive ", "global", " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ;
gl = bsearch(s + word[0], globalkeys, sizeof(globalkeys)/sizeof(struct globalkey_s), sizeof(struct globalkey_s), &globalkey_cmp) ;
@@ -194,7 +194,7 @@ static inline void parse_redirect (char const *s, size_t const *word, size_t n,
static void parse_bitattr (char const *s, size_t const *word, size_t n, char const *domain, size_t domainlen, mdt const *md, unsigned int bit, int set)
{
- static char const *attr[3][2] = { { "noncgi", "cgi" }, { "nonnph", "nph", }, { "noauth", "basic-auth" } } ;
+ static char const *const attr[3][2] = { { "noncgi", "cgi" }, { "nonnph", "nph", }, { "noauth", "basic-auth" } } ;
uint8_t mask = (uint8_t)0x01 << bit ;
if (n != 1)
strerr_dief8x(1, "too ", n > 1 ? "many" : "few", " arguments to directive ", attr[bit][set], " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ;