Skip to content

Commit

Permalink
filter: windows: Use w/o case API for string
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed May 10, 2024
1 parent b0b4402 commit c77dcd0
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 @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit c77dcd0

Please sign in to comment.