From 3cabaca9589d8e3400cf2f9f5fe8f4d4015a5f14 Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 22 Jun 2026 08:45:55 +0000 Subject: conf_api: remove a bunch of redundant parentheses --- src/lib/libcrypto/conf/conf_api.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/conf/conf_api.c b/src/lib/libcrypto/conf/conf_api.c index 0d5a67d9a5..f04243d36c 100644 --- a/src/lib/libcrypto/conf/conf_api.c +++ b/src/lib/libcrypto/conf/conf_api.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_api.c,v 1.29 2025/12/21 07:31:22 tb Exp $ */ +/* $OpenBSD: conf_api.c,v 1.30 2026/06/22 08:45:55 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -76,12 +76,13 @@ _CONF_get_section(const CONF *conf, const char *section) { CONF_VALUE *v, vv; - if ((conf == NULL) || (section == NULL)) - return (NULL); + if (conf == NULL || section == NULL) + return NULL; vv.name = NULL; vv.section = (char *)section; v = lh_CONF_VALUE_retrieve(conf->data, &vv); - return (v); + + return v; } int @@ -113,24 +114,24 @@ _CONF_get_string(const CONF *conf, const char *section, const char *name) CONF_VALUE *v, vv; if (name == NULL) - return (NULL); + return NULL; if (conf != NULL) { if (section != NULL) { vv.name = (char *)name; vv.section = (char *)section; v = lh_CONF_VALUE_retrieve(conf->data, &vv); if (v != NULL) - return (v->value); + return v->value; } vv.section = "default"; vv.name = (char *)name; v = lh_CONF_VALUE_retrieve(conf->data, &vv); if (v != NULL) - return (v->value); + return v->value; else - return (NULL); + return NULL; } else - return (NULL); + return NULL; } static unsigned long @@ -149,15 +150,15 @@ conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b) if (a->section != b->section) { i = strcmp(a->section, b->section); if (i) - return (i); + return i; } if ((a->name != NULL) && (b->name != NULL)) { i = strcmp(a->name, b->name); - return (i); + return i; } else if (a->name == b->name) - return (0); + return 0; else - return ((a->name == NULL)?-1 : 1); + return a->name == NULL ? -1 : 1; } static IMPLEMENT_LHASH_COMP_FN(conf_value, CONF_VALUE) -- cgit v1.2.3-55-g6feb