diff --git a/include/haproxy/pattern.h b/include/haproxy/pattern.h index cfaadcafe..b8496da9d 100644 --- a/include/haproxy/pattern.h +++ b/include/haproxy/pattern.h @@ -191,7 +191,7 @@ int pat_ref_delete(struct pat_ref *ref, const char *key); void pat_ref_delete_by_ptr(struct pat_ref *ref, struct pat_ref_elt *elt); int pat_ref_delete_by_id(struct pat_ref *ref, struct pat_ref_elt *refelt); int pat_ref_prune(struct pat_ref *ref); -int pat_ref_commit(struct pat_ref *ref, struct pat_ref_elt *elt, char **err); +int pat_ref_commit_elt(struct pat_ref *ref, struct pat_ref_elt *elt, char **err); int pat_ref_purge_older(struct pat_ref *ref, unsigned int oldest, int budget); void pat_ref_reload(struct pat_ref *ref, struct pat_ref *replace); diff --git a/src/pattern.c b/src/pattern.c index 0b3bea27d..8729769e5 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -1965,7 +1965,7 @@ int pat_ref_push(struct pat_ref_elt *elt, struct pattern_expr *expr, * pointer may have been updated (and the caller must free it). Failure * causes include memory allocation, parsing error or indexing error. */ -int pat_ref_commit(struct pat_ref *ref, struct pat_ref_elt *elt, char **err) +int pat_ref_commit_elt(struct pat_ref *ref, struct pat_ref_elt *elt, char **err) { struct pattern_expr *expr; @@ -1996,7 +1996,7 @@ struct pat_ref_elt *pat_ref_load(struct pat_ref *ref, unsigned int gen, elt = pat_ref_append(ref, pattern, sample, line); if (elt) { elt->gen_id = gen; - if (!pat_ref_commit(ref, elt, err)) + if (!pat_ref_commit_elt(ref, elt, err)) elt = NULL; } else memprintf(err, "out of memory error");