From: tb Date: Fri, 23 Jun 2023 08:00:28 +0000 (+0000) Subject: Remove some redundant parentheses X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aa60c8c370dc45729a066dc01e06f1eb58556229;p=openbsd Remove some redundant parentheses This file is already enough of an eyesore without them. --- diff --git a/lib/libcrypto/x509/x509_set.c b/lib/libcrypto/x509/x509_set.c index cd12c9ec2fe..b56d30aec59 100644 --- a/lib/libcrypto/x509/x509_set.c +++ b/lib/libcrypto/x509/x509_set.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_set.c,v 1.25 2023/04/25 10:18:39 job Exp $ */ +/* $OpenBSD: x509_set.c,v 1.26 2023/06/23 08:00:28 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -106,7 +106,7 @@ X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial) ASN1_INTEGER *in; if (x == NULL) - return (0); + return 0; in = x->cert_info->serialNumber; if (in != serial) { in = ASN1_INTEGER_dup(serial); @@ -116,17 +116,17 @@ X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial) x->cert_info->serialNumber = in; } } - return (in != NULL); + return in != NULL; } LCRYPTO_ALIAS(X509_set_serialNumber); int X509_set_issuer_name(X509 *x, X509_NAME *name) { - if ((x == NULL) || (x->cert_info == NULL)) - return (0); + if (x == NULL || x->cert_info == NULL) + return 0; x->cert_info->enc.modified = 1; - return (X509_NAME_set(&x->cert_info->issuer, name)); + return X509_NAME_set(&x->cert_info->issuer, name); } LCRYPTO_ALIAS(X509_set_issuer_name); @@ -134,9 +134,9 @@ int X509_set_subject_name(X509 *x, X509_NAME *name) { if (x == NULL || x->cert_info == NULL) - return (0); + return 0; x->cert_info->enc.modified = 1; - return (X509_NAME_set(&x->cert_info->subject, name)); + return X509_NAME_set(&x->cert_info->subject, name); } LCRYPTO_ALIAS(X509_set_subject_name); @@ -151,7 +151,7 @@ ASN1_TIME * X509_getm_notBefore(const X509 *x) { if (x == NULL || x->cert_info == NULL || x->cert_info->validity == NULL) - return (NULL); + return NULL; return x->cert_info->validity->notBefore; } LCRYPTO_ALIAS(X509_getm_notBefore); @@ -162,7 +162,7 @@ X509_set_notBefore(X509 *x, const ASN1_TIME *tm) ASN1_TIME *in; if (x == NULL || x->cert_info->validity == NULL) - return (0); + return 0; in = x->cert_info->validity->notBefore; if (in != tm) { in = ASN1_STRING_dup(tm); @@ -172,7 +172,7 @@ X509_set_notBefore(X509 *x, const ASN1_TIME *tm) x->cert_info->validity->notBefore = in; } } - return (in != NULL); + return in != NULL; } LCRYPTO_ALIAS(X509_set_notBefore); @@ -194,7 +194,7 @@ ASN1_TIME * X509_getm_notAfter(const X509 *x) { if (x == NULL || x->cert_info == NULL || x->cert_info->validity == NULL) - return (NULL); + return NULL; return x->cert_info->validity->notAfter; } LCRYPTO_ALIAS(X509_getm_notAfter); @@ -205,7 +205,7 @@ X509_set_notAfter(X509 *x, const ASN1_TIME *tm) ASN1_TIME *in; if (x == NULL || x->cert_info->validity == NULL) - return (0); + return 0; in = x->cert_info->validity->notAfter; if (in != tm) { in = ASN1_STRING_dup(tm); @@ -215,7 +215,7 @@ X509_set_notAfter(X509 *x, const ASN1_TIME *tm) x->cert_info->validity->notAfter = in; } } - return (in != NULL); + return in != NULL; } LCRYPTO_ALIAS(X509_set_notAfter); @@ -229,10 +229,10 @@ LCRYPTO_ALIAS(X509_set1_notAfter); int X509_set_pubkey(X509 *x, EVP_PKEY *pkey) { - if ((x == NULL) || (x->cert_info == NULL)) - return (0); + if (x == NULL || x->cert_info == NULL) + return 0; x->cert_info->enc.modified = 1; - return (X509_PUBKEY_set(&(x->cert_info->key), pkey)); + return X509_PUBKEY_set(&x->cert_info->key, pkey); } LCRYPTO_ALIAS(X509_set_pubkey);