conf: remove second instance of empty parens ERE group

likewise
This commit is contained in:
rofl0r 2020-10-09 01:00:56 +01:00
parent b07f7a8422
commit 393e51ba45
2 changed files with 3 additions and 10 deletions

View File

@ -743,15 +743,8 @@ static HANDLE_FUNC (handle_listen)
static HANDLE_FUNC (handle_errorfile) static HANDLE_FUNC (handle_errorfile)
{ {
/*
* Because an integer is defined as ((0x)?[[:digit:]]+) _two_
* match places are used. match[2] matches the full digit
* string, while match[3] matches only the "0x" part if
* present. This is why the "string" is located at
* match[4] (rather than the more intuitive match[3].
*/
unsigned long int err = get_long_arg (line, &match[MGROUP1+2]); unsigned long int err = get_long_arg (line, &match[MGROUP1+2]);
char *page = get_string_arg (line, &match[MGROUP1+4]); char *page = get_string_arg (line, &match[MGROUP1+3]);
if(add_new_errorpage (conf, page, err) < 0) { if(add_new_errorpage (conf, page, err) < 0) {
CP_WARN ("add_new_errorpage() failed: '%s'", page); CP_WARN ("add_new_errorpage() failed: '%s'", page);
@ -974,7 +967,7 @@ static HANDLE_FUNC (handle_upstream)
mi += 5; mi += 5;
port = (int) get_long_arg (line, &match[mi]); port = (int) get_long_arg (line, &match[mi]);
mi += 3; mi += 2;
if (match[mi].rm_so != -1) if (match[mi].rm_so != -1)
domain = get_string_arg (line, &match[mi]); domain = get_string_arg (line, &match[mi]);

View File

@ -12,7 +12,7 @@
#define WS SPACE "+" #define WS SPACE "+"
#define STR "\"([^\"]+)\"" #define STR "\"([^\"]+)\""
#define BOOL "(yes|on|no|off)" #define BOOL "(yes|on|no|off)"
#define INT "(()" DIGIT "+)" #define INT "(" DIGIT "+)"
#define ALNUM "([-a-z0-9._]+)" #define ALNUM "([-a-z0-9._]+)"
#define USERNAME "([^:]*)" #define USERNAME "([^:]*)"
#define PASSWORD "([^@]*)" #define PASSWORD "([^@]*)"