Rename the |dont_return_name| flag of |OBJ_obj2txt| to |always_return_oid|.
The name of this has been annoying me every time I've seen it over the
past couple of days. Having a flag with a negation in the name isn't
always bad, but I think this case was.
Change-Id: I5922bf4cc94eab8c59256042a9d9acb575bd40aa
Reviewed-on: https://boringssl-review.googlesource.com/10242
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/obj/obj.c b/crypto/obj/obj.c
index bcc5478..c44ffc8 100644
--- a/crypto/obj/obj.c
+++ b/crypto/obj/obj.c
@@ -454,14 +454,14 @@
}
int OBJ_obj2txt(char *out, int out_len, const ASN1_OBJECT *obj,
- int dont_return_name) {
+ int always_return_oid) {
/* Python depends on the empty OID successfully encoding as the empty
* string. */
if (obj == NULL || obj->length == 0) {
return strlcpy_int(out, "", out_len);
}
- if (!dont_return_name) {
+ if (!always_return_oid) {
int nid = OBJ_obj2nid(obj);
if (nid != NID_undef) {
const char *name = OBJ_nid2ln(nid);