Skip to content

Commit

Permalink
filter: Clarify the comments
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Feb 21, 2024
1 parent 18d34ef commit 32fe3f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmt_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int compare_label_keys(struct cmt_map *src, const char *label_key,
/* Compare with an external context (e.g. Onigmo).
* flb_regex_match should take three arguments that are
* flb_regex context, string and its string length.
* The length of string is changed and not determined by label_key.
* The length of string is changed by the callback and not determined by label_key.
*/
if (compare_ctx != NULL && compare != NULL) {
return compare(compare_ctx, label->name, strlen(label->name));
Expand Down Expand Up @@ -183,7 +183,7 @@ static int compare_fqname(struct cmt_opts *src, const char *fqname,
/* Compare with an external context (e.g. Onigmo).
* flb_regex_match should take three arguments that are
* flb_regex context, string and its string length.
* The length of string is changed and not determined by fqname.
* The length of string is changed by the callback and not determined by fqname.
*/
if (compare_ctx != NULL && compare != NULL) {
return compare(compare_ctx, src->fqname, strlen(src->fqname));
Expand Down

0 comments on commit 32fe3f0

Please sign in to comment.