Unreachable Call at quota.c:249 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
quota_rule_parse_percentage (/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/quota/quota.c)![]() | ||||||
![]() | ||||||
237 | quota_rule_parse_percentage(struct quota_root_settings *root_set, | |||||
238 | struct quota_rule *rule, | |||||
239 | int64_t *limit, const char **error_r) | |||||
240 | { | |||||
241 | int64_t percentage = *limit; | |||||
242 | ||||||
243 | if (percentage <= 0 || percentage >= -1U) { | |||||
244 | *error_r = p_strdup_printf(root_set->set->pool, | |||||
245 | "Invalid rule percentage: %lld", (long long)percentage); | |||||
246 | return -1; | |||||
247 | } | |||||
248 | ||||||
249 | if (rule == &root_set->default_rule) {
| |||||
250 | *error_r = "Default rule can't be a percentage"; | |||||
251 | return -1; | |||||
252 | } | |||||
253 | ||||||
254 | if (limit == &rule->bytes_limit) | |||||
255 | rule->bytes_percent = percentage; | |||||
256 | else if (limit == &rule->count_limit) | |||||
257 | rule->count_percent = percentage; | |||||
258 | else | |||||
259 | i_unreached(); | |||||
260 | return 0; | |||||
261 | } | |||||
![]() |