]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ac-ks: 32bit fixes
authorVictor Julien <victor@inliniac.net>
Mon, 12 Oct 2015 06:47:37 +0000 (08:47 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 4 Apr 2016 16:14:54 +0000 (18:14 +0200)
src/util-mpm-ac-tile-small.c

index fd937f4a6bbe190080997a02fc6ff172133d4b2a..e271dc96dbd7e8c9e5f89556b861b9414c610b4a 100644 (file)
@@ -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__