Skip to content

Commit

Permalink
counters: fix -Wshorten-64-to-32 warnings
Browse files Browse the repository at this point in the history
Ticket: OISF#6186
  • Loading branch information
catenacyber committed Jul 7, 2023
1 parent a23120e commit eb0a420
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/counters.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,9 +1034,9 @@ static uint32_t CountersIdHashFunc(HashTable *ht, void *data, uint16_t datalen)
{
CountersIdType *t = (CountersIdType *)data;
uint32_t hash = 0;
int len = strlen(t->string);
size_t len = strlen(t->string);

for (int i = 0; i < len; i++)
for (size_t i = 0; i < len; i++)
hash += u8_tolower((unsigned char)t->string[i]);

hash = hash % ht->array_size;
Expand All @@ -1048,8 +1048,8 @@ static char CountersIdHashCompareFunc(void *data1, uint16_t datalen1,
{
CountersIdType *t1 = (CountersIdType *)data1;
CountersIdType *t2 = (CountersIdType *)data2;
int len1 = 0;
int len2 = 0;
size_t len1 = 0;
size_t len2 = 0;

if (t1 == NULL || t2 == NULL)
return 0;
Expand Down

0 comments on commit eb0a420

Please sign in to comment.