summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2024-08-16 16:27:17 +0200
committerTomas Mraz <tomas@openssl.org>2024-08-21 15:21:26 +0200
commitd2739fc350227ab17636bcb4b8209ca320b53094 (patch)
tree0d9334c8684a47c213963f70643c428bf35d6c79 /crypto
parentcore_namemap.c: 2048 hashtable buckets should be sufficient (diff)
downloadopenssl-d2739fc350227ab17636bcb4b8209ca320b53094.tar.xz
openssl-d2739fc350227ab17636bcb4b8209ca320b53094.zip
hashtable.c: Code style fixes
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/24504)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/hashtable/hashtable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/hashtable/hashtable.c b/crypto/hashtable/hashtable.c
index 084d442290..2238075447 100644
--- a/crypto/hashtable/hashtable.c
+++ b/crypto/hashtable/hashtable.c
@@ -79,11 +79,11 @@
* structure for faster lookups
*/
#if defined(__GNUC__) || defined(__CLANG__)
-#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
-#define PREFETCH(x) __builtin_prefetch(x)
+# define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
+# define PREFETCH(x) __builtin_prefetch(x)
#else
-#define PREFETCH_NEIGHBORHOOD(x)
-#define PREFETCH(x)
+# define PREFETCH_NEIGHBORHOOD(x)
+# define PREFETCH(x)
#endif
static ossl_unused uint64_t fnv1a_hash(uint8_t *key, size_t len)
@@ -612,7 +612,7 @@ static struct ht_internal_value_st *alloc_new_value(HT *h, HT_KEY *key,
if (h->config.collision_check == 1)
nvsize += key->keysize;
- tmp = OPENSSL_malloc(nvsize);
+ tmp = OPENSSL_malloc(nvsize);
if (tmp == NULL)
return NULL;
@@ -622,7 +622,7 @@ static struct ht_internal_value_st *alloc_new_value(HT *h, HT_KEY *key,
tmp->value.type_id = type;
tmp->value.key.keybuf = NULL;
if (h->config.collision_check) {
- tmp->value.key.keybuf = (uint8_t *)(tmp+1);
+ tmp->value.key.keybuf = (uint8_t *)(tmp + 1);
tmp->value.key.keysize = key->keysize;
memcpy(tmp->value.key.keybuf, key->keybuf, key->keysize);
}