util: Use size_t instead of uint32_t
size_t better matches std::memcmp and the other function in this file.
It is still unsigned.
BUG=b:169156874
TEST=CQ passes
Change-Id: Ibb5ed7abd9af566efba97fc0dffc7b8c87ad1160
diff --git a/include/cryptoc/util.h b/include/cryptoc/util.h
index 6c65c45..70dd7c3 100644
--- a/include/cryptoc/util.h
+++ b/include/cryptoc/util.h
@@ -27,7 +27,7 @@
/* Constant-time memory equality test. Returns 0 to indicate equivalence to
* behave in a memcmp()-compatible way. */
-int ct_memeq(const void* s1, const void* s2, uint32_t n);
+int ct_memeq(const void* s1, const void* s2, size_t n);
#ifdef __cplusplus
}
diff --git a/util.c b/util.c
index c027715..92eb13a 100644
--- a/util.c
+++ b/util.c
@@ -23,7 +23,7 @@
return s;
}
-int ct_memeq(const void* s1, const void* s2, uint32_t n) {
+int ct_memeq(const void* s1, const void* s2, size_t n) {
uint8_t diff = 0;
const uint8_t* ps1 = s1;
const uint8_t* ps2 = s2;