Fix some documentation comments.

The new OPENSSL_PRINTF_FORMAT_FUNC macro let doc.go catch a few problems. It
also confuses doc.go, but this CL doesn't address that. At some point we
probably need to give it a real C parser.

Change-Id: I39f945df04520d1e0a0ba390cac7b308baae0622
Reviewed-on: https://boringssl-review.googlesource.com/6940
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2016-01-21 16:29:21 -05:00 committed by Adam Langley
parent d3a4e280db
commit 95219feafd
2 changed files with 6 additions and 9 deletions

View File

@ -308,10 +308,10 @@ OPENSSL_EXPORT BIO *BIO_find_type(BIO *bio, int type);
OPENSSL_EXPORT void BIO_copy_next_retry(BIO *bio); OPENSSL_EXPORT void BIO_copy_next_retry(BIO *bio);
/* Printf functions. /* Printf functions. */
*
* These functions are versions of printf functions that output to a BIO rather /* BIO_printf behaves like |printf| but outputs to |bio| rather than a |FILE|.
* than a FILE. */ * It returns the number of bytes written or a negative number on error. */
OPENSSL_EXPORT int BIO_printf(BIO *bio, const char *format, ...) OPENSSL_EXPORT int BIO_printf(BIO *bio, const char *format, ...)
OPENSSL_PRINTF_FORMAT_FUNC(2, 3); OPENSSL_PRINTF_FORMAT_FUNC(2, 3);

View File

@ -114,14 +114,11 @@ OPENSSL_EXPORT int OPENSSL_strncasecmp(const char *a, const char *b, size_t n);
* representation of the given type. */ * representation of the given type. */
#define DECIMAL_SIZE(type) ((sizeof(type)*8+2)/3+1) #define DECIMAL_SIZE(type) ((sizeof(type)*8+2)/3+1)
/* Printf functions. /* BIO_snprintf has the same behavior as snprintf(3). */
*
* These functions are either OpenSSL wrappers for standard functions (i.e.
* |BIO_snprintf| and |BIO_vsnprintf|) which don't exist in C89, or are
* versions of printf functions that output to a BIO rather than a FILE. */
OPENSSL_EXPORT int BIO_snprintf(char *buf, size_t n, const char *format, ...) OPENSSL_EXPORT int BIO_snprintf(char *buf, size_t n, const char *format, ...)
OPENSSL_PRINTF_FORMAT_FUNC(3, 4); OPENSSL_PRINTF_FORMAT_FUNC(3, 4);
/* BIO_vsnprintf has the same behavior as vsnprintf(3). */
OPENSSL_EXPORT int BIO_vsnprintf(char *buf, size_t n, const char *format, OPENSSL_EXPORT int BIO_vsnprintf(char *buf, size_t n, const char *format,
va_list args) va_list args)
OPENSSL_PRINTF_FORMAT_FUNC(3, 0); OPENSSL_PRINTF_FORMAT_FUNC(3, 0);