]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
hashtable.c: Code style fixes
authorTomas Mraz <tomas@openssl.org>
Fri, 16 Aug 2024 14:27:17 +0000 (16:27 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 21 Aug 2024 13:21:26 +0000 (15:21 +0200)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/24504)

crypto/hashtable/hashtable.c

index 084d4422904d1d156ece2377742086805be204f7..223807544785f39025f6e321e8bcd2061ccfeebb 100644 (file)
  * 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);
     }