detect: fix minor compile warning

detect-engine.c: In function ‘DetectKeywordCtxHashFunc’:
detect-engine.c:3550:75: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 3550 |     uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (uint64_t)ctx->data;
      |
pull/9288/head
Victor Julien 2 years ago
parent b1535fe1f9
commit 73b0efb03a

@ -3547,7 +3547,7 @@ static uint32_t DetectKeywordCtxHashFunc(HashListTable *ht, void *data, uint16_t
{
DetectEngineThreadKeywordCtxItem *ctx = data;
const char *name = ctx->name;
uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (uint64_t)ctx->data;
uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (ptrdiff_t)ctx->data;
hash %= ht->array_size;
return hash;
}

Loading…
Cancel
Save