From: Tomas Mraz Date: Fri, 16 Aug 2024 14:27:17 +0000 (+0200) Subject: hashtable.c: Code style fixes X-Git-Tag: openssl-3.4.0-alpha1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2739fc350227ab17636bcb4b8209ca320b53094;p=thirdparty%2Fopenssl.git hashtable.c: Code style fixes Reviewed-by: Neil Horman Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/24504) --- diff --git a/crypto/hashtable/hashtable.c b/crypto/hashtable/hashtable.c index 084d4422904..22380754478 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); }