diff options
author | Daniel Mack <daniel@zonque.org> | 2015-11-16 23:17:52 +0100 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-11-16 23:17:52 +0100 |
commit | 933f9caeeb2b3c1b951d330e04beb04226e5a890 (patch) | |
tree | dc36a6ddd84b060590c4885db7b6c3e9e91081eb /src/import/pull-common.c | |
parent | 5cd6491b71008334daa9965464e038dc3e39948a (diff) |
siphash24: let siphash24_finalize() and siphash24() return the result directly
Rather than passing a pointer to return the result, return it directly
from the function calls.
Also, return the result in native endianess, and let the callers care
about the conversion. For hash tables and bloom filters, we don't care,
but in order to keep MAC addresses and DHCP client IDs stable, we
explicitly convert to LE.
Diffstat (limited to 'src/import/pull-common.c')
-rw-r--r-- | src/import/pull-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/import/pull-common.c b/src/import/pull-common.c index 16b0c6160f..a83cffffa0 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -165,7 +165,7 @@ static int hash_url(const char *url, char **ret) { assert(url); - siphash24(&h, url, strlen(url), k.bytes); + h = siphash24(url, strlen(url), k.bytes); if (asprintf(ret, "%"PRIx64, h) < 0) return -ENOMEM; |