Consistently use \c NULL and \c 0

This commit is contained in:
Gilles Peskine 2019-10-01 18:30:02 +02:00 committed by Simon Butcher
parent 9e2543bd4f
commit 20a3846725
2 changed files with 14 additions and 14 deletions

View file

@ -232,7 +232,7 @@ void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx );
* length of the buffer. * length of the buffer.
* \param p_entropy The entropy context to pass to \p f_entropy. * \param p_entropy The entropy context to pass to \p f_entropy.
* \param custom Personalization data, that is device-specific * \param custom Personalization data, that is device-specific
* identifiers. This can be NULL, in which case the * identifiers. This can be \c NULL, in which case the
* personalization data is empty regardless of the value * personalization data is empty regardless of the value
* of \p len. * of \p len.
* \param len The length of the personalization data. * \param len The length of the personalization data.
@ -330,7 +330,7 @@ void mbedtls_ctr_drbg_set_reseed_interval( mbedtls_ctr_drbg_context *ctx,
* extracts data from the entropy source. * extracts data from the entropy source.
* *
* \param ctx The CTR_DRBG context. * \param ctx The CTR_DRBG context.
* \param additional Additional data to add to the state. Can be NULL. * \param additional Additional data to add to the state. Can be \c NULL.
* \param len The length of the additional data. * \param len The length of the additional data.
* This must be less than * This must be less than
* #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - \c entropy_len * #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - \c entropy_len
@ -348,7 +348,7 @@ int mbedtls_ctr_drbg_reseed( mbedtls_ctr_drbg_context *ctx,
* *
* \param ctx The CTR_DRBG context. * \param ctx The CTR_DRBG context.
* \param additional The data to update the state with. This must not be * \param additional The data to update the state with. This must not be
* null unless \p add_len is 0. * \c NULL unless \p add_len is \c 0.
* \param add_len Length of \p additional in bytes. This must be at * \param add_len Length of \p additional in bytes. This must be at
* most #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT. * most #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT.
* *
@ -372,11 +372,11 @@ int mbedtls_ctr_drbg_update_ret( mbedtls_ctr_drbg_context *ctx,
* #mbedtls_ctr_drbg_context structure. * #mbedtls_ctr_drbg_context structure.
* \param output The buffer to fill. * \param output The buffer to fill.
* \param output_len The length of the buffer in bytes. * \param output_len The length of the buffer in bytes.
* \param additional Additional data to update. Can be NULL, in which * \param additional Additional data to update. Can be \c NULL, in which
* case the additional data is empty regardless of * case the additional data is empty regardless of
* the value of \p add_len. * the value of \p add_len.
* \param add_len The length of the additional data * \param add_len The length of the additional data
* if \p additional is non-null. * if \p additional is not \c NULL.
* This must be less than #MBEDTLS_CTR_DRBG_MAX_INPUT * This must be less than #MBEDTLS_CTR_DRBG_MAX_INPUT
* and less than * and less than
* #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - \c entropy_len * #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - \c entropy_len

View file

@ -155,7 +155,7 @@ void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx );
* length of the buffer. * length of the buffer.
* \param p_entropy The entropy context to pass to \p f_entropy. * \param p_entropy The entropy context to pass to \p f_entropy.
* \param custom Personalization data, that is device-specific * \param custom Personalization data, that is device-specific
* identifiers. This can be NULL, in which case the * identifiers. This can be \c NULL, in which case the
* personalization data is empty regardless of the value * personalization data is empty regardless of the value
* of \p len. * of \p len.
* \param len The length of the personalization data. * \param len The length of the personalization data.
@ -165,7 +165,7 @@ void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx );
* where \p entropy_len is the entropy length * where \p entropy_len is the entropy length
* described above. * described above.
* *
* \return 0 if successful. * \return \c 0 if successful.
* \return #MBEDTLS_ERR_MD_BAD_INPUT_DATA if \p md_info is * \return #MBEDTLS_ERR_MD_BAD_INPUT_DATA if \p md_info is
* invalid. * invalid.
* \return #MBEDTLS_ERR_MD_ALLOC_FAILED if there was not enough * \return #MBEDTLS_ERR_MD_ALLOC_FAILED if there was not enough
@ -192,7 +192,7 @@ int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx,
* the additional data. * the additional data.
* \param data_len Length of \p data in bytes. * \param data_len Length of \p data in bytes.
* *
* \return 0 if successful. or * \return \c 0 if successful. or
* \return #MBEDTLS_ERR_MD_BAD_INPUT_DATA if \p md_info is * \return #MBEDTLS_ERR_MD_BAD_INPUT_DATA if \p md_info is
* invalid. * invalid.
* \return #MBEDTLS_ERR_MD_ALLOC_FAILED if there was not enough * \return #MBEDTLS_ERR_MD_ALLOC_FAILED if there was not enough
@ -251,9 +251,9 @@ void mbedtls_hmac_drbg_set_reseed_interval( mbedtls_hmac_drbg_context *ctx,
* *
* \param ctx The HMAC_DRBG context. * \param ctx The HMAC_DRBG context.
* \param additional The data to update the state with. * \param additional The data to update the state with.
* If this is \p NULL, there is no additional data. * If this is \c NULL, there is no additional data.
* \param add_len Length of \p additional in bytes. * \param add_len Length of \p additional in bytes.
* Unused if \p additional is null. * Unused if \p additional is \c NULL.
* *
* \return \c 0 on success, or an error from the underlying * \return \c 0 on success, or an error from the underlying
* hash calculation or * hash calculation or
@ -277,7 +277,7 @@ int mbedtls_hmac_drbg_update_ret( mbedtls_hmac_drbg_context *ctx,
* where \p entropy_len is the entropy length * where \p entropy_len is the entropy length
* (see mbedtls_hmac_drbg_set_entropy_len()). * (see mbedtls_hmac_drbg_set_entropy_len()).
* *
* \return 0 if successful. * \return \c 0 if successful.
* \return #MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED * \return #MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED
* if a call to the entropy function failed. * if a call to the entropy function failed.
*/ */
@ -296,7 +296,7 @@ int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx,
* \param output_len The length of the buffer in bytes. * \param output_len The length of the buffer in bytes.
* This must be at most #MBEDTLS_HMAC_DRBG_MAX_REQUEST. * This must be at most #MBEDTLS_HMAC_DRBG_MAX_REQUEST.
* \param additional Additional data to update with. * \param additional Additional data to update with.
* If this is \p NULL, there is no additional data * If this is \c NULL, there is no additional data
* and \p add_len should be \c 0. * and \p add_len should be \c 0.
* \param add_len The length of the additional data. * \param add_len The length of the additional data.
* This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT. * This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT.
@ -358,9 +358,9 @@ void mbedtls_hmac_drbg_free( mbedtls_hmac_drbg_context *ctx );
* *
* \param ctx The HMAC_DRBG context. * \param ctx The HMAC_DRBG context.
* \param additional The data to update the state with. * \param additional The data to update the state with.
* If this is \p NULL, there is no additional data. * If this is \c NULL, there is no additional data.
* \param add_len Length of \p additional in bytes. * \param add_len Length of \p additional in bytes.
* Unused if \p additional is null. * Unused if \p additional is \c NULL.
*/ */
MBEDTLS_DEPRECATED void mbedtls_hmac_drbg_update( MBEDTLS_DEPRECATED void mbedtls_hmac_drbg_update(
mbedtls_hmac_drbg_context *ctx, mbedtls_hmac_drbg_context *ctx,