summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/errstr.c
diff options
context:
space:
mode:
authortb <>2023-03-06 14:32:06 +0000
committertb <>2023-03-06 14:32:06 +0000
commit6c965e26b1a93da63948edae6b68564be1ded507 (patch)
treebbe07d6e06b695cebe22802551f2db0a61354d7c /src/usr.bin/openssl/errstr.c
parent48e828ea26ee91710242131cd75cd9d1d20b773c (diff)
downloadopenbsd-6c965e26b1a93da63948edae6b68564be1ded507.tar.gz
openbsd-6c965e26b1a93da63948edae6b68564be1ded507.tar.bz2
openbsd-6c965e26b1a93da63948edae6b68564be1ded507.zip
Rename struct ${app}_config to plain cfg
All the structs are static and we need to reach into them many times. Having a shorter name is more concise and results in less visual clutter. It also avoids many overlong lines and we will be able to get rid of some unfortunate line wrapping down the road. Discussed with jsing
Diffstat (limited to 'src/usr.bin/openssl/errstr.c')
-rw-r--r--src/usr.bin/openssl/errstr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/usr.bin/openssl/errstr.c b/src/usr.bin/openssl/errstr.c
index 64f0141ba0..cb7cf1d5a3 100644
--- a/src/usr.bin/openssl/errstr.c
+++ b/src/usr.bin/openssl/errstr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: errstr.c,v 1.9 2023/03/05 13:12:53 tb Exp $ */ 1/* $OpenBSD: errstr.c,v 1.10 2023/03/06 14:32:06 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 *
@@ -70,14 +70,14 @@
70 70
71static struct { 71static struct {
72 int stats; 72 int stats;
73} errstr_config; 73} cfg;
74 74
75static const struct option errstr_options[] = { 75static const struct option errstr_options[] = {
76 { 76 {
77 .name = "stats", 77 .name = "stats",
78 .desc = "Print debugging statistics for the hash table", 78 .desc = "Print debugging statistics for the hash table",
79 .type = OPTION_FLAG, 79 .type = OPTION_FLAG,
80 .opt.flag = &errstr_config.stats, 80 .opt.flag = &cfg.stats,
81 }, 81 },
82 { NULL }, 82 { NULL },
83}; 83};
@@ -103,14 +103,14 @@ errstr_main(int argc, char **argv)
103 exit(1); 103 exit(1);
104 } 104 }
105 105
106 memset(&errstr_config, 0, sizeof(errstr_config)); 106 memset(&cfg, 0, sizeof(cfg));
107 107
108 if (options_parse(argc, argv, errstr_options, NULL, &argsused) != 0) { 108 if (options_parse(argc, argv, errstr_options, NULL, &argsused) != 0) {
109 errstr_usage(); 109 errstr_usage();
110 return (1); 110 return (1);
111 } 111 }
112 112
113 if (errstr_config.stats) { 113 if (cfg.stats) {
114 BIO *out; 114 BIO *out;
115 115
116 if ((out = BIO_new_fp(stdout, BIO_NOCLOSE)) == NULL) { 116 if ((out = BIO_new_fp(stdout, BIO_NOCLOSE)) == NULL) {