diff options
| author | jvoisin | 2017-10-26 13:39:33 +0200 |
|---|---|---|
| committer | jvoisin | 2017-10-26 13:39:33 +0200 |
| commit | fa40064f0851b988478b283be4663ade1cf7f7e0 (patch) | |
| tree | 30026a4e5fe7f2f3793c968ce321f4f2cc44d0ef /src/sp_config_keywords.c | |
| parent | 5964129ff04d797081a0b24fb9683a909e1cc0e3 (diff) | |
Remove an arbitrary limitation
Diffstat (limited to 'src/sp_config_keywords.c')
| -rw-r--r-- | src/sp_config_keywords.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 604c2a1..3101ee1 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -235,23 +235,18 @@ int parse_disabled_functions(char *line) { | |||
| 235 | if (pos) { | 235 | if (pos) { |
| 236 | errno = 0; | 236 | errno = 0; |
| 237 | char *endptr; | 237 | char *endptr; |
| 238 | df->pos = strtol(pos, &endptr, 10); | 238 | df->pos = (int)strtol(pos, &endptr, 10); |
| 239 | if (errno != 0 || endptr == pos) { | 239 | if (errno != 0 || endptr == pos) { |
| 240 | sp_log_err("config", "Failed to parse arg '%s' of `pos` on line %zu.", | 240 | sp_log_err("config", "Failed to parse arg '%s' of `pos` on line %zu.", |
| 241 | pos, sp_line_no); | 241 | pos, sp_line_no); |
| 242 | return -1; | 242 | return -1; |
| 243 | } | 243 | } |
| 244 | |||
| 245 | // We'll never have a function with more than 128 params | ||
| 246 | if (df->pos > 128) { | ||
| 247 | df->pos = 128; | ||
| 248 | } | ||
| 249 | } | 244 | } |
| 250 | 245 | ||
| 251 | if (line_number) { | 246 | if (line_number) { |
| 252 | errno = 0; | 247 | errno = 0; |
| 253 | char *endptr; | 248 | char *endptr; |
| 254 | df->line = strtoul(line_number, &endptr, 10); | 249 | df->line = (unsigned int)strtoul(line_number, &endptr, 10); |
| 255 | if (errno != 0 || endptr == line_number) { | 250 | if (errno != 0 || endptr == line_number) { |
| 256 | sp_log_err("config", "Failed to parse arg '%s' of `line` on line %zu.", | 251 | sp_log_err("config", "Failed to parse arg '%s' of `line` on line %zu.", |
| 257 | line_number, sp_line_no); | 252 | line_number, sp_line_no); |
