hash/unihash.c: Replace a dynamic assertion with a static one.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 29 Sep 2019 14:18:53 +0000 (15:18 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 Sep 2019 14:19:22 +0000 (15:19 +0100)
hash/unihash.c

index a6f9ae2..c5ccd7e 100644 (file)
@@ -27,9 +27,9 @@
 
 /*----- Header files ------------------------------------------------------*/
 
-#include <assert.h>
 #include <stdlib.h>
 
+#include "macros.h"
 #include "unihash.h"
 
 /*----- Main code ---------------------------------------------------------*/
@@ -92,7 +92,7 @@ uint32 unihash_hash(const unihash_info *i, uint32 a,
 {
   const octet *pp = p;
 
-  assert(UNIHASH_NBATCH == 4);
+  STATIC_ASSERT(UNIHASH_NBATCH == 4, "Batch size doesn't match computation");
 
 #define FULLMULT(u, x)                                                 \
   (i->s[u][0][U8((x) >>         0)] ^ i->s[u][1][U8((x) >>  8)] ^              \