diff options
author | Dimitri Staessens <[email protected]> | 2023-08-16 18:15:14 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2023-08-23 13:09:11 +0200 |
commit | ab8ee0b24335790e49127b1330f9d7bcca7f6bfa (patch) | |
tree | b58fa560f7bf52d951547522f9b6d87244af3e06 /src/ipcpd/shim-data.c | |
parent | de9674f090c2ae71cacd5f8bd6dcf5e8657ad686 (diff) | |
download | ouroboros-ab8ee0b24335790e49127b1330f9d7bcca7f6bfa.tar.gz ouroboros-ab8ee0b24335790e49127b1330f9d7bcca7f6bfa.zip |
include: Revise printing hashes
The code was a bit convoluted to print hashes as hex strings. Renamed
to HASH_FMT32 and HASH_VAL32 to make clear we are printing the first
32 bits only, and added options to print 64 up to 512 bits as well.
This doesn't depend on endianness anymore. Adds a small test for the
hash (printing) functions.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/shim-data.c')
-rw-r--r-- | src/ipcpd/shim-data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/shim-data.c b/src/ipcpd/shim-data.c index 9f720e32..840b8224 100644 --- a/src/ipcpd/shim-data.c +++ b/src/ipcpd/shim-data.c @@ -297,8 +297,8 @@ int shim_data_reg_add_entry(struct shim_data * data, if (find_reg_entry_by_hash(data, hash)) { pthread_rwlock_unlock(&data->reg_lock); - log_dbg(HASH_FMT " was already in the directory.", - HASH_VAL(hash)); + log_dbg(HASH_FMT32 " was already in the directory.", + HASH_VAL32(hash)); return 0; } |