summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-03-20 22:11:07 +0000
committertb <>2024-03-20 22:11:07 +0000
commit1b600e300f5c0054a7d40857d1805049c27fed19 (patch)
tree2a543517908b9c7cc0b5199ef047cfe288683914 /src
parentf4c8048a8c0fac3898d6ad17827af3abc0f6bf35 (diff)
downloadopenbsd-1b600e300f5c0054a7d40857d1805049c27fed19.tar.gz
openbsd-1b600e300f5c0054a7d40857d1805049c27fed19.tar.bz2
openbsd-1b600e300f5c0054a7d40857d1805049c27fed19.zip
Rename the remaining pmod to mod
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/conf/conf_mod.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c
index 887d9c7341..280d8edd20 100644
--- a/src/lib/libcrypto/conf/conf_mod.c
+++ b/src/lib/libcrypto/conf/conf_mod.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_mod.c,v 1.35 2024/03/20 22:08:22 tb Exp $ */ 1/* $OpenBSD: conf_mod.c,v 1.36 2024/03/20 22:11:07 tb Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -104,7 +104,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
104static int module_add(const char *name, conf_init_func *ifunc, 104static int module_add(const char *name, conf_init_func *ifunc,
105 conf_finish_func *ffunc); 105 conf_finish_func *ffunc);
106static CONF_MODULE *module_find(char *name); 106static CONF_MODULE *module_find(char *name);
107static int module_init(CONF_MODULE *pmod, char *name, char *value, 107static int module_init(CONF_MODULE *mod, char *name, char *value,
108 const CONF *cnf); 108 const CONF *cnf);
109 109
110/* Main function: load modules from a CONF structure */ 110/* Main function: load modules from a CONF structure */
@@ -277,7 +277,7 @@ module_find(char *name)
277 277
278/* initialize a module */ 278/* initialize a module */
279static int 279static int
280module_init(CONF_MODULE *pmod, char *name, char *value, const CONF *cnf) 280module_init(CONF_MODULE *mod, char *name, char *value, const CONF *cnf)
281{ 281{
282 int ret = 1; 282 int ret = 1;
283 int init_called = 0; 283 int init_called = 0;
@@ -288,7 +288,7 @@ module_init(CONF_MODULE *pmod, char *name, char *value, const CONF *cnf)
288 if (!imod) 288 if (!imod)
289 goto err; 289 goto err;
290 290
291 imod->mod = pmod; 291 imod->mod = mod;
292 imod->name = name ? strdup(name) : NULL; 292 imod->name = name ? strdup(name) : NULL;
293 imod->value = value ? strdup(value) : NULL; 293 imod->value = value ? strdup(value) : NULL;
294 imod->usr_data = NULL; 294 imod->usr_data = NULL;
@@ -297,8 +297,8 @@ module_init(CONF_MODULE *pmod, char *name, char *value, const CONF *cnf)
297 goto memerr; 297 goto memerr;
298 298
299 /* Try to initialize module */ 299 /* Try to initialize module */
300 if (pmod->init) { 300 if (mod->init) {
301 ret = pmod->init(imod, cnf); 301 ret = mod->init(imod, cnf);
302 init_called = 1; 302 init_called = 1;
303 /* Error occurred, exit */ 303 /* Error occurred, exit */
304 if (ret <= 0) 304 if (ret <= 0)
@@ -318,14 +318,14 @@ module_init(CONF_MODULE *pmod, char *name, char *value, const CONF *cnf)
318 goto err; 318 goto err;
319 } 319 }
320 320
321 pmod->links++; 321 mod->links++;
322 322
323 return ret; 323 return ret;
324 324
325err: 325err:
326 /* We've started the module so we'd better finish it */ 326 /* We've started the module so we'd better finish it */
327 if (pmod->finish && init_called) 327 if (mod->finish && init_called)
328 pmod->finish(imod); 328 mod->finish(imod);
329 329
330memerr: 330memerr:
331 if (imod) { 331 if (imod) {
@@ -474,15 +474,15 @@ CONF_imodule_set_flags(CONF_IMODULE *imod, unsigned long flags)
474} 474}
475 475
476void * 476void *
477CONF_module_get_usr_data(CONF_MODULE *pmod) 477CONF_module_get_usr_data(CONF_MODULE *mod)
478{ 478{
479 return pmod->usr_data; 479 return mod->usr_data;
480} 480}
481 481
482void 482void
483CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data) 483CONF_module_set_usr_data(CONF_MODULE *mod, void *usr_data)
484{ 484{
485 pmod->usr_data = usr_data; 485 mod->usr_data = usr_data;
486} 486}
487 487
488/* Return default config file name */ 488/* Return default config file name */