Fix up some doc.go nits in asn1.h.

Not quite ready to add it to doc.config, but this fixes up the different
C++ guard styles, and a few mistakes in the comments.

Bug: 426
Change-Id: I027f14b2f79861e510bfa7a958604f47ae78dda1
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/49911
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h
index ead6384..3ac4b28 100644
--- a/include/openssl/asn1.h
+++ b/include/openssl/asn1.h
@@ -63,11 +63,10 @@
 #include <time.h>
 
 #include <openssl/bio.h>
+#include <openssl/bn.h>
 #include <openssl/stack.h>
 
-#include <openssl/bn.h>
-
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -556,10 +555,9 @@
                                        const ASN1_STRING *in);
 
 // The following formats define encodings for use with functions like
-// |ASN1_mbstring_copy|.
+// |ASN1_mbstring_copy|. Note |MBSTRING_ASC| refers to Latin-1, not ASCII.
 #define MBSTRING_FLAG 0x1000
 #define MBSTRING_UTF8 (MBSTRING_FLAG)
-// |MBSTRING_ASC| refers to Latin-1, not ASCII.
 #define MBSTRING_ASC (MBSTRING_FLAG | 1)
 #define MBSTRING_BMP (MBSTRING_FLAG | 2)
 #define MBSTRING_UNIV (MBSTRING_FLAG | 4)
@@ -781,8 +779,8 @@
 // success and zero on error.
 OPENSSL_EXPORT int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
 
-// ASN1_INTEGER_set sets |a| to an INTEGER with value |v|. It returns one on
-// success and zero on error.
+// ASN1_INTEGER_set_uint64 sets |a| to an INTEGER with value |v|. It returns one
+// on success and zero on error.
 OPENSSL_EXPORT int ASN1_INTEGER_set_uint64(ASN1_INTEGER *out, uint64_t v);
 
 // ASN1_INTEGER_get returns the value of |a| as a |long|, or -1 if |a| is out of
@@ -836,8 +834,8 @@
 // on success and zero on error.
 OPENSSL_EXPORT int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
 
-// ASN1_INTEGER_get returns the value of |a| as a |long|, or -1 if |a| is out of
-// range or the wrong type.
+// ASN1_ENUMERATED_get returns the value of |a| as a |long|, or -1 if |a| is out
+// of range or the wrong type.
 OPENSSL_EXPORT long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
 
 // BN_to_ASN1_ENUMERATED sets |ai| to an ENUMERATED with value |bn| and returns
@@ -1500,8 +1498,8 @@
 OPENSSL_EXPORT ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
 
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern C
 
 extern "C++" {
 
diff --git a/include/openssl/x509.h b/include/openssl/x509.h
index 59f2adf..070145b 100644
--- a/include/openssl/x509.h
+++ b/include/openssl/x509.h
@@ -82,7 +82,7 @@
 #include <openssl/thread.h>
 #include <time.h>
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -2336,8 +2336,8 @@
     const X509_POLICY_NODE *node);
 
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern C
 #endif
 
 #if !defined(BORINGSSL_NO_CXX)
diff --git a/include/openssl/x509v3.h b/include/openssl/x509v3.h
index 8e4a511..9c86b90 100644
--- a/include/openssl/x509v3.h
+++ b/include/openssl/x509v3.h
@@ -60,7 +60,7 @@
 #include <openssl/lhash.h>
 #include <openssl/x509.h>
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -928,8 +928,8 @@
 // made after this point may be overwritten when the script is next run.
 
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern C
 
 extern "C++" {