Remove redundant parentheses from the return statement

This commit is contained in:
Ondřej Surý
2024-11-19 10:38:03 +01:00
parent 3873b0c279
commit 0258850f20
437 changed files with 10832 additions and 10856 deletions

View File

@@ -40,20 +40,20 @@ main() {
if (ctx == NULL || evp_md_ctx == NULL) {
ERR_clear_error();
return (1);
return 1;
}
if (EVP_PKEY_keygen_init(ctx) != 1 ||
EVP_PKEY_keygen(ctx, &pkey) != 1 || pkey == NULL)
{
ERR_clear_error();
return (1);
return 1;
}
bytes = sizeof(buf);
if (EVP_PKEY_get_raw_public_key(pkey, buf, &bytes) != 1) {
ERR_clear_error();
return (1);
return 1;
}
printf("unsigned char ed25519_pub[] = \"");
@@ -68,7 +68,7 @@ main() {
(const unsigned char *)"test", 4) != 1)
{
ERR_clear_error();
return (1);
return 1;
}
printf("unsigned char ed25519_sig[] = \"");
@@ -85,20 +85,20 @@ main() {
evp_md_ctx = EVP_MD_CTX_create();
if (ctx == NULL || evp_md_ctx == NULL) {
ERR_clear_error();
return (1);
return 1;
}
if (EVP_PKEY_keygen_init(ctx) != 1 ||
EVP_PKEY_keygen(ctx, &pkey) != 1 || pkey == NULL)
{
ERR_clear_error();
return (1);
return 1;
}
bytes = sizeof(buf);
if (EVP_PKEY_get_raw_public_key(pkey, buf, &bytes) != 1) {
ERR_clear_error();
return (1);
return 1;
}
printf("unsigned char ed448_pub[] = \"");
@@ -113,7 +113,7 @@ main() {
(const unsigned char *)"test", 4) != 1)
{
ERR_clear_error();
return (1);
return 1;
}
printf("unsigned char ed448_sig[] = \"");
@@ -125,5 +125,5 @@ main() {
EVP_MD_CTX_free(evp_md_ctx);
EVP_PKEY_free(pkey);
return (0);
return 0;
}

View File

@@ -52,7 +52,7 @@ main() {
if (e == NULL || n == NULL || ctx == NULL || evp_md_ctx == NULL) {
ERR_clear_error();
return (1);
return 1;
}
BN_set_bit(e, 0);
@@ -64,13 +64,13 @@ main() {
EVP_PKEY_keygen(ctx, &pkey) != 1 || pkey == NULL)
{
ERR_clear_error();
return (1);
return 1;
}
EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_N, &n);
if (n == NULL) {
ERR_clear_error();
return (1);
return 1;
}
bytes = BN_num_bytes(e);
@@ -94,7 +94,7 @@ main() {
EVP_SignFinal(evp_md_ctx, buf, &siglen, pkey) != 1)
{
ERR_clear_error();
return (1);
return 1;
}
bytes = siglen;
printf("unsigned char sha1_sig[] = \"");
@@ -108,7 +108,7 @@ main() {
EVP_SignFinal(evp_md_ctx, buf, &siglen, pkey) != 1)
{
ERR_clear_error();
return (1);
return 1;
}
bytes = siglen;
printf("unsigned char sha256_sig[] = \"");
@@ -122,7 +122,7 @@ main() {
EVP_SignFinal(evp_md_ctx, buf, &siglen, pkey) != 1)
{
ERR_clear_error();
return (1);
return 1;
}
bytes = siglen;
printf("unsigned char sha512_sig[] = \"");
@@ -134,5 +134,5 @@ main() {
EVP_MD_CTX_free(evp_md_ctx);
EVP_PKEY_free(pkey);
return (0);
return 0;
}

View File

@@ -29,9 +29,9 @@ isc__mem_get(void *mem, unsigned int size FLARG) {
}
__coverity_negative_sink__(size);
if (condition) {
return (0);
return 0;
}
return (__coverity_alloc__(size));
return __coverity_alloc__(size);
}
void
@@ -57,9 +57,9 @@ isc__mem_allocate(void *mem, unsigned int size FLARG) {
}
__coverity_negative_sink__(size);
if (condition) {
return (0);
return 0;
}
return (__coverity_alloc__(size));
return __coverity_alloc__(size);
}
void *
@@ -83,7 +83,7 @@ isc__mem_reallocate(void *mem, void *ptr, size_t size FLARG) {
} else if (ptr) {
__coverity_free__(ptr);
}
return (p);
return p;
}
void
@@ -104,11 +104,11 @@ isc__mem_strdup(void *mem, char *s FLARG) {
__coverity_panic__();
}
if (condition) {
return (0);
return 0;
}
d = __coverity_alloc__(strlen(s) + 1);
__coverity_writeall__(d);
return (d);
return d;
}
void *
@@ -118,9 +118,9 @@ isc__mempool_get(void *mem FLARG) {
__coverity_panic__();
}
if (condition) {
return (0);
return 0;
}
return (__coverity_alloc__(size));
return __coverity_alloc__(size);
}
void