Fix typos/style in doxygen documentation
diff --git a/include/mbedtls/memory_buffer_alloc.h b/include/mbedtls/memory_buffer_alloc.h
index 3408f34..5e14823 100644
--- a/include/mbedtls/memory_buffer_alloc.h
+++ b/include/mbedtls/memory_buffer_alloc.h
@@ -127,7 +127,7 @@
* is defined. (Includes stack trace information for each block if
* MBEDTLS_MEMORY_BACKTRACE is defined as well).
*
- * \returns 0 if verified, 1 otherwise
+ * \return 0 if verified, 1 otherwise
*/
int mbedtls_memory_buffer_alloc_verify( void );
diff --git a/include/mbedtls/net.h b/include/mbedtls/net.h
index 9f757fe..586bd34 100644
--- a/include/mbedtls/net.h
+++ b/include/mbedtls/net.h
@@ -149,7 +149,7 @@
* \param buf The buffer to write to
* \param len Maximum length of the buffer
*
- * \return This function returns the number of bytes received,
+ * \return the number of bytes received,
* or a non-zero error code; with a non-blocking socket,
* MBEDTLS_ERR_SSL_WANT_READ indicates read() would block.
*/
@@ -163,7 +163,7 @@
* \param buf The buffer to read from
* \param len The length of the buffer
*
- * \return This function returns the number of bytes sent,
+ * \return the number of bytes sent,
* or a non-zero error code; with a non-blocking socket,
* MBEDTLS_ERR_SSL_WANT_WRITE indicates write() would block.
*/
@@ -179,7 +179,7 @@
* \param len Maximum length of the buffer
* \param timeout Maximum number of milliseconds to wait for data
*
- * \return This function returns the number of bytes received,
+ * \return the number of bytes received,
* or a non-zero error code:
* MBEDTLS_ERR_SSL_TIMEOUT if the operation timed out,
* MBEDTLS_ERR_SSL_WANT_READ if interrupted by a signal.
diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h
index 4586fc0..ffd06dd 100644
--- a/include/mbedtls/pk.h
+++ b/include/mbedtls/pk.h
@@ -546,7 +546,7 @@
* \param buf buffer to write to
* \param size size of the buffer
*
- * \return 0 successful, or a specific error code
+ * \return 0 if successful, or a specific error code
*/
int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size );
@@ -557,7 +557,7 @@
* \param buf buffer to write to
* \param size size of the buffer
*
- * \return 0 successful, or a specific error code
+ * \return 0 if successful, or a specific error code
*/
int mbedtls_pk_write_key_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size );
#endif /* MBEDTLS_PEM_WRITE_C */
diff --git a/include/mbedtls/rsa.h b/include/mbedtls/rsa.h
index 15afaee..3898687 100644
--- a/include/mbedtls/rsa.h
+++ b/include/mbedtls/rsa.h
@@ -625,7 +625,7 @@
* \param dst Destination context
* \param src Source context
*
- * \return O on success,
+ * \return 0 on success,
* MBEDTLS_ERR_MPI_ALLOC_FAILED on memory allocation failure
*/
int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src );
diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h
index bb68d76..b9654ba 100644
--- a/include/mbedtls/ssl.h
+++ b/include/mbedtls/ssl.h
@@ -2029,8 +2029,9 @@
* \param buf buffer that will hold the data
* \param len maximum number of bytes to read
*
- * \return This function returns the number of bytes read, 0 for EOF,
- * or a negative error code.
+ * \return the number of bytes read, or
+ * 0 for EOF, or
+ * a negative error code.
*/
int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len );
@@ -2041,7 +2042,7 @@
* \param buf buffer holding the data
* \param len how many bytes must be written
*
- * \return This function returns the number of bytes written,
+ * \return the number of bytes written,
* or a negative error code.
*
* \note When this function returns MBEDTLS_ERR_SSL_WANT_WRITE,
diff --git a/include/mbedtls/ssl_ticket.h b/include/mbedtls/ssl_ticket.h
index 36b2f4c..caa8380 100644
--- a/include/mbedtls/ssl_ticket.h
+++ b/include/mbedtls/ssl_ticket.h
@@ -95,7 +95,7 @@
* least as strong as the the strongest ciphersuite
* supported. Usually that means a 256-bit key.
*
- * \return 0 is successful,
+ * \return 0 if successful,
* or a specific MBEDTLS_ERR_XXX error code
*/
int mbedtls_ssl_ticket_setup( mbedtls_ssl_ticket_context *ctx,
diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h
index 19df51e..da5ff35 100644
--- a/include/mbedtls/x509_crt.h
+++ b/include/mbedtls/x509_crt.h
@@ -283,7 +283,7 @@
* \param usage_oid Intended usage (eg MBEDTLS_OID_SERVER_AUTH or MBEDTLS_OID_CLIENT_AUTH).
* \param usage_len Length of usage_oid (eg given by MBEDTLS_OID_SIZE()).
*
- * \return 0 is this use of the certificate is allowed,
+ * \return 0 if this use of the certificate is allowed,
* MBEDTLS_ERR_X509_BAD_INPUT_DATA if not.
*
* \note Usually only makes sense on leaf certificates.
@@ -544,7 +544,7 @@
* \param f_rng RNG function (for signature, see note)
* \param p_rng RNG parameter
*
- * \return 0 successful, or a specific error code
+ * \return 0 if successful, or a specific error code
*
* \note f_rng may be NULL if RSA is used for signature and the
* signature is made offline (otherwise f_rng is desirable
diff --git a/include/mbedtls/x509_csr.h b/include/mbedtls/x509_csr.h
index 7ae7d22..b52ffff 100644
--- a/include/mbedtls/x509_csr.h
+++ b/include/mbedtls/x509_csr.h
@@ -273,7 +273,7 @@
* \param f_rng RNG function (for signature, see note)
* \param p_rng RNG parameter
*
- * \return 0 successful, or a specific error code
+ * \return 0 if successful, or a specific error code
*
* \note f_rng may be NULL if RSA is used for signature and the
* signature is made offline (otherwise f_rng is desirable