diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-05-09 14:29:09 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-05-09 14:29:09 +0000 |
commit | c951a104c2a557a365be24f142e8b4614b9e4c1c (patch) | |
tree | cc5a8047b5600a032ff127fabd645fb25d4caa3f /lib/libcrypto | |
parent | 365f0beca83a6f6ec64918d654df4ed69b80e312 (diff) |
Tiny style tweaks in X509_REQ_add_extension_nid()
Test & assign and use ret instead of rv.
ok jsing
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/x509/x509_req.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libcrypto/x509/x509_req.c b/lib/libcrypto/x509/x509_req.c index 3d19c9ee4f5..a21542c3baa 100644 --- a/lib/libcrypto/x509/x509_req.c +++ b/lib/libcrypto/x509/x509_req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_req.c,v 1.40 2024/05/09 14:27:21 tb Exp $ */ +/* $OpenBSD: x509_req.c,v 1.41 2024/05/09 14:29:08 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -211,16 +211,15 @@ X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, { unsigned char *ext = NULL; int extlen; - int rv; + int ret; - extlen = i2d_X509_EXTENSIONS(exts, &ext); - if (extlen <= 0) + if ((extlen = i2d_X509_EXTENSIONS(exts, &ext)) <= 0) return 0; - rv = X509_REQ_add1_attr_by_NID(req, nid, V_ASN1_SEQUENCE, ext, extlen); + ret = X509_REQ_add1_attr_by_NID(req, nid, V_ASN1_SEQUENCE, ext, extlen); free(ext); - return rv; + return ret; } LCRYPTO_ALIAS(X509_REQ_add_extensions_nid); |