From 0987fd16dce9a05d7f2b0fc61df4ad687368dc60 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 12 Oct 2015 08:47:37 +0200 Subject: [PATCH] ac-ks: 32bit fixes --- src/util-mpm-ac-tile-small.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util-mpm-ac-tile-small.c b/src/util-mpm-ac-tile-small.c index fd937f4a6b..e271dc96db 100644 --- a/src/util-mpm-ac-tile-small.c +++ b/src/util-mpm-ac-tile-small.c @@ -45,7 +45,7 @@ uint32_t FUNC_NAME(SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thread_ctx, STYPE state = 0; int c = xlate[buf[0]]; /* If buflen at least 4 bytes and buf 4-byte aligned. */ - if (buflen >= (4 + EXTRA) && ((uint64_t)buf & 0x3) == 0) { + if (buflen >= (4 + EXTRA) && ((uintptr_t)buf & 0x3) == 0) { BTYPE data = *(BTYPE* restrict)(&buf[0]); uint64_t index = 0; /* Process 4*floor(buflen/4) bytes. */ @@ -85,7 +85,7 @@ uint32_t FUNC_NAME(SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thread_ctx, } /* Process buflen % 4 bytes. */ for (; i < buflen; i++) { - uint64_t index = 0 ; + size_t index = 0 ; index = SINDEX(index, state); state = SLOAD(state_table + index + c); #ifndef __tile__