altcp: mbedtls: coding style fixes

This commit is contained in:
Simon Goldschmidt 2020-03-05 21:45:20 +01:00
parent 87618e2f2a
commit 33f2b313c7

View File

@ -718,7 +718,7 @@ altcp_mbedtls_debug(void *ctx, int level, const char *file, int line, const char
#endif
static err_t
altcp_mbedtls_ref_entropy()
altcp_mbedtls_ref_entropy(void)
{
SYS_ARCH_DECL_PROTECT(old_level);
SYS_ARCH_PROTECT(old_level);
@ -742,27 +742,25 @@ altcp_mbedtls_ref_entropy()
SYS_ARCH_UNPROTECT(old_level);
return ERR_ARG;
}
}
else {
} else {
SYS_ARCH_UNPROTECT(old_level);
return ERR_MEM;
}
}
else
} else {
altcp_tls_entropy_rng->ref++;
}
SYS_ARCH_UNPROTECT(old_level);
return ERR_OK;
}
static void
altcp_mbedtls_unref_entropy()
altcp_mbedtls_unref_entropy(void)
{
SYS_ARCH_DECL_PROTECT(old_level);
SYS_ARCH_PROTECT(old_level);
if (altcp_tls_entropy_rng && altcp_tls_entropy_rng->ref)
if (altcp_tls_entropy_rng && altcp_tls_entropy_rng->ref) {
altcp_tls_entropy_rng->ref--;
}
SYS_ARCH_UNPROTECT(old_level);
}