diff options
author | tb <> | 2023-03-25 10:45:20 +0000 |
---|---|---|
committer | tb <> | 2023-03-25 10:45:20 +0000 |
commit | 8f6a176b11245e22d8e84f2f6a0cdc03471c1f7c (patch) | |
tree | 51242f52aa1e00990251b7fd904117a40ba6530c | |
parent | 6bc25ffff5cc4d3d7ee39d5eb151e2f851a2a0a7 (diff) | |
download | openbsd-8f6a176b11245e22d8e84f2f6a0cdc03471c1f7c.tar.gz openbsd-8f6a176b11245e22d8e84f2f6a0cdc03471c1f7c.tar.bz2 openbsd-8f6a176b11245e22d8e84f2f6a0cdc03471c1f7c.zip |
Drop unnecessary casts from and to void *
-rw-r--r-- | src/lib/libcrypto/asn1/bio_asn1.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c index 8fb9bc5bf4..7e25a9c410 100644 --- a/src/lib/libcrypto/asn1/bio_asn1.c +++ b/src/lib/libcrypto/asn1/bio_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_asn1.c,v 1.20 2023/03/25 10:41:52 tb Exp $ */ | 1 | /* $OpenBSD: bio_asn1.c,v 1.21 2023/03/25 10:45:20 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project. | 3 | * project. |
4 | */ | 4 | */ |
@@ -163,7 +163,7 @@ asn1_bio_new(BIO *b) | |||
163 | ctx->state = ASN1_STATE_START; | 163 | ctx->state = ASN1_STATE_START; |
164 | 164 | ||
165 | b->init = 1; | 165 | b->init = 1; |
166 | b->ptr = (char *)ctx; | 166 | b->ptr = ctx; |
167 | b->flags = 0; | 167 | b->flags = 0; |
168 | 168 | ||
169 | return 1; | 169 | return 1; |
@@ -172,9 +172,8 @@ asn1_bio_new(BIO *b) | |||
172 | static int | 172 | static int |
173 | asn1_bio_free(BIO *b) | 173 | asn1_bio_free(BIO *b) |
174 | { | 174 | { |
175 | BIO_ASN1_BUF_CTX *ctx; | 175 | BIO_ASN1_BUF_CTX *ctx = b->ptr; |
176 | 176 | ||
177 | ctx = (BIO_ASN1_BUF_CTX *) b->ptr; | ||
178 | if (ctx == NULL) | 177 | if (ctx == NULL) |
179 | return 0; | 178 | return 0; |
180 | 179 | ||
@@ -200,8 +199,8 @@ asn1_bio_write(BIO *b, const char *in , int inl) | |||
200 | 199 | ||
201 | if (!in || (inl < 0) || (b->next_bio == NULL)) | 200 | if (!in || (inl < 0) || (b->next_bio == NULL)) |
202 | return 0; | 201 | return 0; |
203 | ctx = (BIO_ASN1_BUF_CTX *) b->ptr; | 202 | |
204 | if (ctx == NULL) | 203 | if ((ctx = b->ptr) == NULL) |
205 | return 0; | 204 | return 0; |
206 | 205 | ||
207 | wrlen = 0; | 206 | wrlen = 0; |
@@ -366,8 +365,7 @@ asn1_bio_ctrl(BIO *b, int cmd, long arg1, void *arg2) | |||
366 | BIO_ASN1_EX_FUNCS *ex_func; | 365 | BIO_ASN1_EX_FUNCS *ex_func; |
367 | long ret = 1; | 366 | long ret = 1; |
368 | 367 | ||
369 | ctx = (BIO_ASN1_BUF_CTX *) b->ptr; | 368 | if ((ctx = b->ptr) == NULL) |
370 | if (ctx == NULL) | ||
371 | return 0; | 369 | return 0; |
372 | switch (cmd) { | 370 | switch (cmd) { |
373 | 371 | ||