summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2026-06-22 08:45:55 +0000
committertb <>2026-06-22 08:45:55 +0000
commit3cabaca9589d8e3400cf2f9f5fe8f4d4015a5f14 (patch)
tree9ca9695783c0fbd04bebb25833be24ca0c5ecfaa /src
parentd11a583392d8bfc3ae5c2b7e03e6ca17d179db3e (diff)
downloadopenbsd-3cabaca9589d8e3400cf2f9f5fe8f4d4015a5f14.tar.gz
openbsd-3cabaca9589d8e3400cf2f9f5fe8f4d4015a5f14.tar.bz2
openbsd-3cabaca9589d8e3400cf2f9f5fe8f4d4015a5f14.zip
conf_api: remove a bunch of redundant parentheses
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/conf/conf_api.c27
1 files changed, 14 insertions, 13 deletions
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 @@
1/* $OpenBSD: conf_api.c,v 1.29 2025/12/21 07:31:22 tb Exp $ */ 1/* $OpenBSD: conf_api.c,v 1.30 2026/06/22 08:45:55 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -76,12 +76,13 @@ _CONF_get_section(const CONF *conf, const char *section)
76{ 76{
77 CONF_VALUE *v, vv; 77 CONF_VALUE *v, vv;
78 78
79 if ((conf == NULL) || (section == NULL)) 79 if (conf == NULL || section == NULL)
80 return (NULL); 80 return NULL;
81 vv.name = NULL; 81 vv.name = NULL;
82 vv.section = (char *)section; 82 vv.section = (char *)section;
83 v = lh_CONF_VALUE_retrieve(conf->data, &vv); 83 v = lh_CONF_VALUE_retrieve(conf->data, &vv);
84 return (v); 84
85 return v;
85} 86}
86 87
87int 88int
@@ -113,24 +114,24 @@ _CONF_get_string(const CONF *conf, const char *section, const char *name)
113 CONF_VALUE *v, vv; 114 CONF_VALUE *v, vv;
114 115
115 if (name == NULL) 116 if (name == NULL)
116 return (NULL); 117 return NULL;
117 if (conf != NULL) { 118 if (conf != NULL) {
118 if (section != NULL) { 119 if (section != NULL) {
119 vv.name = (char *)name; 120 vv.name = (char *)name;
120 vv.section = (char *)section; 121 vv.section = (char *)section;
121 v = lh_CONF_VALUE_retrieve(conf->data, &vv); 122 v = lh_CONF_VALUE_retrieve(conf->data, &vv);
122 if (v != NULL) 123 if (v != NULL)
123 return (v->value); 124 return v->value;
124 } 125 }
125 vv.section = "default"; 126 vv.section = "default";
126 vv.name = (char *)name; 127 vv.name = (char *)name;
127 v = lh_CONF_VALUE_retrieve(conf->data, &vv); 128 v = lh_CONF_VALUE_retrieve(conf->data, &vv);
128 if (v != NULL) 129 if (v != NULL)
129 return (v->value); 130 return v->value;
130 else 131 else
131 return (NULL); 132 return NULL;
132 } else 133 } else
133 return (NULL); 134 return NULL;
134} 135}
135 136
136static unsigned long 137static unsigned long
@@ -149,15 +150,15 @@ conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b)
149 if (a->section != b->section) { 150 if (a->section != b->section) {
150 i = strcmp(a->section, b->section); 151 i = strcmp(a->section, b->section);
151 if (i) 152 if (i)
152 return (i); 153 return i;
153 } 154 }
154 if ((a->name != NULL) && (b->name != NULL)) { 155 if ((a->name != NULL) && (b->name != NULL)) {
155 i = strcmp(a->name, b->name); 156 i = strcmp(a->name, b->name);
156 return (i); 157 return i;
157 } else if (a->name == b->name) 158 } else if (a->name == b->name)
158 return (0); 159 return 0;
159 else 160 else
160 return ((a->name == NULL)?-1 : 1); 161 return a->name == NULL ? -1 : 1;
161} 162}
162 163
163static IMPLEMENT_LHASH_COMP_FN(conf_value, CONF_VALUE) 164static IMPLEMENT_LHASH_COMP_FN(conf_value, CONF_VALUE)