From 7e843e52f72b4b8fcbd830a3434eb95f1326ded6 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Fri, 10 May 2024 15:17:05 +0900 Subject: [PATCH] filter: windows: Use w/o case API for string Signed-off-by: Hiroshi Hatake --- src/cmt_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmt_filter.c b/src/cmt_filter.c index cdba2a0..52f7648 100644 --- a/src/cmt_filter.c +++ b/src/cmt_filter.c @@ -170,7 +170,7 @@ static int filter_get_label_index(struct cmt_map *src, const char *label_key) cfl_list_foreach(head, &src->label_keys) { label = cfl_list_entry(head, struct cmt_map_label, _head); - if (strcasecmp(label->name, label_key) == 0) { + if (strncmp(label->name, label_key, strlen(label->name)) == 0) { return index; } @@ -212,7 +212,7 @@ int metrics_check_label_value_existence(struct cmt_metric *metric, return CMT_FALSE; } - if (strncasecmp(label->name, label_value, strlen(label->name)) == 0) { + if (strncmp(label->name, label_value, strlen(label->name)) == 0) { return CMT_TRUE; }