As we expose the type's internals, there's no concrete difference between
the two, but it might help static code checkers to detect misuse of the
library, or sloppy typing.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
return binary_to_hex(guid, GUID_128_SIZE);
}
-unsigned int guid_128_hash(const uint8_t *guid)
+unsigned int guid_128_hash(const guid_128_t guid)
{
return mem_hash(guid, GUID_128_SIZE);
}
-int guid_128_cmp(const uint8_t *guid1, const uint8_t *guid2)
+int guid_128_cmp(const guid_128_t guid1, const guid_128_t guid2)
{
return memcmp(guid1, guid2, GUID_128_SIZE);
}
int guid_128_from_string(const char *str, guid_128_t guid_r);
/* guid_128 hash/cmp functions for hash.h */
-unsigned int guid_128_hash(const uint8_t *guid);
-int guid_128_cmp(const uint8_t *guid1, const uint8_t *guid2);
+unsigned int guid_128_hash(const guid_128_t guid);
+int guid_128_cmp(const guid_128_t guid1, const guid_128_t guid2);
/* Return the hash of host used by guid_128_generate(). */
void guid_128_host_hash_get(const char *host,