mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Add couple missing braces around single-line statements
The clang-format-15 has new option InsertBraces that could add missing branches around single line statements. Use that to our advantage without switching to not-yet-released LLVM version to add missing braces in couple of places.
This commit is contained in:
@@ -394,8 +394,9 @@ openssleddsa_todns(const dst_key_t *key, isc_buffer_t *data) {
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
if (EVP_PKEY_get_raw_public_key(pkey, r.base, &len) != 1)
|
||||
if (EVP_PKEY_get_raw_public_key(pkey, r.base, &len) != 1) {
|
||||
return (dst__openssl_toresult(ISC_R_FAILURE));
|
||||
}
|
||||
|
||||
isc_buffer_add(data, len);
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -418,8 +419,9 @@ openssleddsa_fromdns(dst_key_t *key, isc_buffer_t *data) {
|
||||
|
||||
len = r.length;
|
||||
ret = raw_key_to_ossl(key->key_alg, 0, r.base, &len, &pkey);
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
isc_buffer_forward(data, len);
|
||||
key->keydata.pkey = pkey;
|
||||
@@ -457,8 +459,9 @@ openssleddsa_tofile(const dst_key_t *key, const char *directory) {
|
||||
}
|
||||
buf = isc_mem_get(key->mctx, len);
|
||||
if (EVP_PKEY_get_raw_private_key(key->keydata.pkey, buf,
|
||||
&len) != 1)
|
||||
&len) != 1) {
|
||||
DST_RET(dst__openssl_toresult(ISC_R_FAILURE));
|
||||
}
|
||||
priv.elements[i].tag = TAG_EDDSA_PRIVATEKEY;
|
||||
priv.elements[i].length = len;
|
||||
priv.elements[i].data = buf;
|
||||
|
Reference in New Issue
Block a user