defined id_log() only once

This commit is contained in:
Marc Stern
2024-04-16 13:28:37 +02:00
parent 556835c6fe
commit 5122f89005
4 changed files with 5 additions and 13 deletions

View File

@@ -31,10 +31,9 @@
#endif
// Returns the rule id if existing, otherwise the file name & line number
static const char* id_log(msre_rule* rule) {
const char* id_log(msre_rule* rule) {
char* id = rule->actionset->id;
if (id == NOT_SET_P || !id || !*id)
id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
return id;
}