make tests easier to read
This commit is contained in:
parent
26ca6c422d
commit
883bfed7a7
6
vger.c
6
vger.c
|
@ -514,14 +514,16 @@ split_request(const char *request, char *hostname, char *path, char *query)
|
|||
char buf[BUFSIZ] = {'\0'}; /* to handle error messages */
|
||||
int ret = 0;
|
||||
|
||||
if ((ret = regcomp(&greg, gemini_regex, REG_EXTENDED)) != 0) {
|
||||
ret = regcomp(&greg, gemini_regex, REG_EXTENDED);
|
||||
if (ret != 0) {
|
||||
regerror(ret, &greg, buf, sizeof(buf));
|
||||
regfree(&greg);
|
||||
status(50, "Internal server error");
|
||||
stop(EXIT_FAILURE, "%s", buf);
|
||||
}
|
||||
|
||||
if ((ret = regexec(&greg, request, nmatch, match, 0)) != 0) {
|
||||
ret = regexec(&greg, request, nmatch, match, 0);
|
||||
if (ret != 0) {
|
||||
regerror(ret, &greg, buf, sizeof(buf));
|
||||
regfree(&greg);
|
||||
status(59, "Malformed request");
|
||||
|
|
Loading…
Reference in New Issue