Improve doc about length of strings written
diff --git a/include/mbedtls/x509.h b/include/mbedtls/x509.h
index e82f1c6..cd658c5 100644
--- a/include/mbedtls/x509.h
+++ b/include/mbedtls/x509.h
@@ -222,8 +222,8 @@
  * \param size     Maximum size of buffer
  * \param dn       The X509 name to represent
  *
- * \return         The amount of data written to the buffer, or -1 in
- *                 case of an error.
+ * \return         The length of the string written (not including the
+ *                 terminated nul byte), or a negative error code.
  */
 int mbedtls_x509_dn_gets( char *buf, size_t size, const mbedtls_x509_name *dn );
 
@@ -235,8 +235,8 @@
  * \param size     Maximum size of buffer
  * \param serial   The X509 serial to represent
  *
- * \return         The amount of data written to the buffer, or -1 in
- *                 case of an error.
+ * \return         The length of the string written (not including the
+ *                 terminated nul byte), or a negative error code.
  */
 int mbedtls_x509_serial_gets( char *buf, size_t size, const mbedtls_x509_buf *serial );
 
diff --git a/include/mbedtls/x509_crl.h b/include/mbedtls/x509_crl.h
index 7b40739..dbc4642 100644
--- a/include/mbedtls/x509_crl.h
+++ b/include/mbedtls/x509_crl.h
@@ -143,8 +143,8 @@
  * \param prefix   A line prefix
  * \param crl      The X509 CRL to represent
  *
- * \return         The amount of data written to the buffer, or -1 in
- *                 case of an error.
+ * \return         The length of the string written (not including the
+ *                 terminated nul byte), or a negative error code.
  */
 int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix,
                    const mbedtls_x509_crl *crl );
diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h
index fb86d4c..c0abc52 100644
--- a/include/mbedtls/x509_crt.h
+++ b/include/mbedtls/x509_crt.h
@@ -228,8 +228,8 @@
  * \param prefix   A line prefix
  * \param crt      The X509 certificate to represent
  *
- * \return         The amount of data written to the buffer, or -1 in
- *                 case of an error.
+ * \return         The length of the string written (not including the
+ *                 terminated nul byte), or a negative error code.
  */
 int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix,
                    const mbedtls_x509_crt *crt );
@@ -243,8 +243,8 @@
  * \param prefix   A line prefix
  * \param flags    Verification flags created by mbedtls_x509_crt_verify()
  *
- * \return         The amount of data written to the buffer, or -1 in
- *                 case of an error.
+ * \return         The length of the string written (not including the
+ *                 terminated nul byte), or a negative error code.
  */
 int mbedtls_x509_crt_verify_info( char *buf, size_t size, const char *prefix,
                           uint32_t flags );
diff --git a/include/mbedtls/x509_csr.h b/include/mbedtls/x509_csr.h
index b52ffff..64dd937 100644
--- a/include/mbedtls/x509_csr.h
+++ b/include/mbedtls/x509_csr.h
@@ -126,8 +126,8 @@
  * \param prefix   A line prefix
  * \param csr      The X509 CSR to represent
  *
- * \return         The length of the string written (exluding the terminating
- *                 null byte), or a negative value in case of an error.
+ * \return         The length of the string written (not including the
+ *                 terminated nul byte), or a negative error code.
  */
 int mbedtls_x509_csr_info( char *buf, size_t size, const char *prefix,
                    const mbedtls_x509_csr *csr );