From a127bde4222baccfb77b561b1461c93e1911e8f0 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 9 Aug 2023 20:20:20 +0000 Subject: tipidee-config error message fix Signed-off-by: Laurent Bercot --- src/config/lexparse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/config/lexparse.c b/src/config/lexparse.c index 91743bb..a051f93 100644 --- a/src/config/lexparse.c +++ b/src/config/lexparse.c @@ -110,7 +110,8 @@ static inline void parse_global (char const *s, size_t const *word, size_t n, md { char pack[4] ; uint32_t u ; - if (n > 2) strerr_dief8x(1, "too ", "many", " arguments to global setting ", s + word[0], " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; + if (n > 2) + strerr_dief8x(1, "too ", "many", " arguments to global setting ", s + word[0], " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; if (!uint320_scan(s + word[1], &u)) strerr_dief6x(1, "invalid (non-numeric) value for global setting ", s + word[0], " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; uint32_pack_big(pack, u) ; @@ -134,17 +135,17 @@ static inline void parse_contenttype (char const *s, size_t const *word, size_t { char const *ct ; if (n < 2) - strerr_dief8x(1, "too ", "few", " arguments to directive ", "redirect", " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; + strerr_dief8x(1, "too ", "few", " arguments to directive ", "content-type", " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; ct = s + *word++ ; if (!strchr(ct, '/')) - strerr_dief6x(1, "Content-Type must include a slash, ", "check directive", " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; + strerr_dief6x(1, "Content-Type must include a slash", " - check directive content-type", " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; n-- ; for (size_t i = 0 ; i < n ; i++) { size_t len = strlen(s + word[i]) ; char key[len + 2] ; if (s[word[i]] != '.') - strerr_dief6x(1, "file extensions must start with a dot, ", "check directive", " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; + strerr_dief6x(1, "file extensions must start with a dot", " - check directive content-type", " in file ", g.storage.s + md->filepos, " line ", md->linefmt) ; key[0] = 'T' ; key[1] = ':' ; memcpy(key + 2, s + word[i] + 1, len - 1) ; -- cgit v1.2.3