tweaks: rename three variables, to use full words instead of abbrevs

This commit is contained in:
Benno Schulenberg 2019-06-05 14:47:46 +02:00
parent 7c1b649eb8
commit cdc9482d8f
1 changed files with 9 additions and 9 deletions

View File

@ -272,24 +272,24 @@ char *parse_next_regex(char *ptr)
bool compile(const char *expression, int rex_flags, regex_t **packed)
{
regex_t *compiled = nmalloc(sizeof(regex_t));
int rc = regcomp(compiled, expression, rex_flags);
int outcome = regcomp(compiled, expression, rex_flags);
if (rc != 0) {
size_t len = regerror(rc, compiled, NULL, 0);
char *str = charalloc(len);
if (outcome != 0) {
size_t length = regerror(outcome, compiled, NULL, 0);
char *message = charalloc(length);
regerror(rc, compiled, str, len);
rcfile_error(N_("Bad regex \"%s\": %s"), expression, str);
free(str);
regerror(outcome, compiled, message, length);
rcfile_error(N_("Bad regex \"%s\": %s"), expression, message);
free(message);
}
if (packed == NULL || rc != 0) {
if (packed == NULL || outcome != 0) {
regfree(compiled);
free(compiled);
} else
*packed = compiled;
return (rc == 0);
return (outcome == 0);
}
/* Parse the next syntax name and its possible extension regexes from the