chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f50c136
)
hash/unihash.c: Replace a dynamic assertion with a static one.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 29 Sep 2019 14:18:53 +0000
(15:18 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 29 Sep 2019 14:19:22 +0000
(15:19 +0100)
hash/unihash.c
patch
|
blob
|
blame
|
history
diff --git
a/hash/unihash.c
b/hash/unihash.c
index a6f9ae2a51c0247a5e68c14c82b39b693425b537..c5ccd7e7476790fa4a129deddda23ac44d242b61 100644
(file)
--- a/
hash/unihash.c
+++ b/
hash/unihash.c
@@
-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)] ^ \