diff options
Diffstat (limited to 'src/sp_var_parser.c')
| -rw-r--r-- | src/sp_var_parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sp_var_parser.c b/src/sp_var_parser.c index b57386e..72cbc12 100644 --- a/src/sp_var_parser.c +++ b/src/sp_var_parser.c | |||
| @@ -31,7 +31,7 @@ static bool is_var_name_valid(const char *name) { | |||
| 31 | regexp_const = sp_pcre_compile(REGEXP_CONST); | 31 | regexp_const = sp_pcre_compile(REGEXP_CONST); |
| 32 | } | 32 | } |
| 33 | if (NULL == regexp_var || NULL == regexp_const) { | 33 | if (NULL == regexp_var || NULL == regexp_const) { |
| 34 | return false; | 34 | return false; // LCOV_EXCL_LINE |
| 35 | } | 35 | } |
| 36 | if ((false == sp_is_regexp_matching(regexp_var, name)) && | 36 | if ((false == sp_is_regexp_matching(regexp_var, name)) && |
| 37 | (false == sp_is_regexp_matching(regexp_const, name))) { | 37 | (false == sp_is_regexp_matching(regexp_const, name))) { |
| @@ -64,8 +64,10 @@ static int create_var(sp_tree *tree, const char *restrict value, | |||
| 64 | var_node->type = VAR; | 64 | var_node->type = VAR; |
| 65 | } | 65 | } |
| 66 | if (!(var_node->value = pestrndup(value, value_len, 1))) { | 66 | if (!(var_node->value = pestrndup(value, value_len, 1))) { |
| 67 | // LCOV_EXCL_START | ||
| 67 | sp_log_err("config", "Can't allocate a strndup"); | 68 | sp_log_err("config", "Can't allocate a strndup"); |
| 68 | return -1; | 69 | return -1; |
| 70 | // LCOV_EXCL_STOP | ||
| 69 | } | 71 | } |
| 70 | if (var_node->type != INTERPRETED_STRING && | 72 | if (var_node->type != INTERPRETED_STRING && |
| 71 | !is_var_name_valid(var_node->value)) { | 73 | !is_var_name_valid(var_node->value)) { |
