This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 0e0ad5b74da3bfa434d64b21b8dcfa0d4acc0e0b
Author: makejian <[email protected]>
AuthorDate: Tue Nov 10 18:03:12 2026 +0800

    crypto/mbedtls: fix nxstyle errors in the ALT sources
    
    The checkpatch CI runs nxstyle on every file touched by a PR, and the
    entropy_alt.c and cmac_alt.c sources still carry a few long-standing
    style issues: statements directly after the declarations, and switch
    case bodies indented one level too deep. Clean them up so both files
    pass nxstyle as-is. No functional change.
    
    Signed-off-by: makejian <[email protected]>
---
 crypto/mbedtls/source/cmac_alt.c    | 8 ++++----
 crypto/mbedtls/source/entropy_alt.c | 2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/crypto/mbedtls/source/cmac_alt.c b/crypto/mbedtls/source/cmac_alt.c
index f00f868e3..c9060f7d9 100644
--- a/crypto/mbedtls/source/cmac_alt.c
+++ b/crypto/mbedtls/source/cmac_alt.c
@@ -51,11 +51,11 @@ int mbedtls_cipher_cmac_starts(FAR mbedtls_cipher_context_t 
*ctx,
   switch (ctx->cipher_info->type)
     {
       case MBEDTLS_CIPHER_AES_128_ECB:
-          cipher_type = CRYPTO_AES_CMAC;
-          mac_type = CRYPTO_AES_128_CMAC;
-          break;
+        cipher_type = CRYPTO_AES_CMAC;
+        mac_type = CRYPTO_AES_128_CMAC;
+        break;
       default:
-          return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA;
+        return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA;
     }
 
   cmac_ctx = mbedtls_calloc(1, sizeof(mbedtls_cmac_context_t));
diff --git a/crypto/mbedtls/source/entropy_alt.c 
b/crypto/mbedtls/source/entropy_alt.c
index 365688242..cab4ad723 100644
--- a/crypto/mbedtls/source/entropy_alt.c
+++ b/crypto/mbedtls/source/entropy_alt.c
@@ -42,6 +42,7 @@ int mbedtls_hardware_poll(FAR void *data,
 {
   int fd;
   size_t read_len;
+
   *olen = 0;
 
   fd = open("/dev/random", O_RDONLY | O_NONBLOCK, 0);
@@ -71,6 +72,7 @@ psa_status_t mbedtls_psa_external_get_random(
 {
   int fd;
   size_t read_len;
+
   *output_length = 0;
 
   (void)context;

Reply via email to