1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Switch to the new code style

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2023-01-11 14:50:10 +01:00
parent fd13a0f851
commit 449bd8303e
442 changed files with 86735 additions and 89438 deletions

View File

@ -27,28 +27,30 @@
static const char * const features[] = {
#if defined(MBEDTLS_VERSION_FEATURES)
FEATURE_DEFINES
FEATURE_DEFINES
#endif /* MBEDTLS_VERSION_FEATURES */
NULL
};
int mbedtls_version_check_feature( const char *feature )
int mbedtls_version_check_feature(const char *feature)
{
const char * const *idx = features;
if( *idx == NULL )
return( -2 );
if (*idx == NULL) {
return -2;
}
if( feature == NULL )
return( -1 );
if (feature == NULL) {
return -1;
}
while( *idx != NULL )
{
if( !strcmp( *idx, feature ) )
return( 0 );
while (*idx != NULL) {
if (!strcmp(*idx, feature)) {
return 0;
}
idx++;
}
return( -1 );
return -1;
}
#endif /* MBEDTLS_VERSION_C */