diff options
Diffstat (limited to 'src/sp_config_utils.c')
| -rw-r--r-- | src/sp_config_utils.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c index 71dd373..1a797e5 100644 --- a/src/sp_config_utils.c +++ b/src/sp_config_utils.c | |||
| @@ -20,7 +20,12 @@ static int validate_str(const char *value) { | |||
| 20 | return -1; | 20 | return -1; |
| 21 | } | 21 | } |
| 22 | } | 22 | } |
| 23 | return balance != 0; | 23 | if (balance != 0) { |
| 24 | sp_log_err("config", "You forgot to close %d bracket%c in the string '%s'", | ||
| 25 | balance, (balance>1)?'s':' ', value); | ||
| 26 | return -1; | ||
| 27 | } | ||
| 28 | return 0; | ||
| 24 | } | 29 | } |
| 25 | 30 | ||
| 26 | int parse_keywords(sp_config_functions *funcs, char *line) { | 31 | int parse_keywords(sp_config_functions *funcs, char *line) { |
| @@ -112,7 +117,7 @@ err: | |||
| 112 | sp_log_err("error", | 117 | sp_log_err("error", |
| 113 | "There is an issue with the parsing of '%s': it doesn't look like a valid string on line %zu.", | 118 | "There is an issue with the parsing of '%s': it doesn't look like a valid string on line %zu.", |
| 114 | original_line ? original_line : "NULL", sp_line_no); | 119 | original_line ? original_line : "NULL", sp_line_no); |
| 115 | } | 120 | } |
| 116 | line = NULL; | 121 | line = NULL; |
| 117 | return NULL; | 122 | return NULL; |
| 118 | } | 123 | } |
