From 802e137b92e6bada41e7cc4d80391a2275543599 Mon Sep 17 00:00:00 2001 From: Achim Kraus Date: Wed, 28 Feb 2024 10:41:54 +0100 Subject: [PATCH] dtls.c: fix formatting of GET_VAR_FIELD. Signed-off-by: Achim Kraus --- dtls.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dtls.c b/dtls.c index 632bd78..fbab793 100644 --- a/dtls.c +++ b/dtls.c @@ -240,18 +240,18 @@ memarray_t dtlscontext_storage; * \param A alert description in case of a length violation * \param M logging message in case of a length violation */ -#define GET_VAR_FIELD(VL, P, L, T, A, M) { \ - if (L < sizeof(T)) { \ - dtls_info("%s: field length exceeds buffer", M); \ - return dtls_alert_fatal_create(A); \ - } \ - VL = dtls_ ## T ## _to_int(P); \ - L -= sizeof(T); \ - P += sizeof(T); \ - if (L < VL) { \ - dtls_info("%s: field value exceeds buffer", M); \ - return dtls_alert_fatal_create(A); \ - } \ +#define GET_VAR_FIELD(VL, P, L, T, A, M) { \ + if (L < sizeof(T)) { \ + dtls_info("%s: field length exceeds buffer", M); \ + return dtls_alert_fatal_create(A); \ + } \ + VL = dtls_ ## T ## _to_int(P); \ + L -= sizeof(T); \ + P += sizeof(T); \ + if (L < VL) { \ + dtls_info("%s: field value exceeds buffer", M); \ + return dtls_alert_fatal_create(A); \ + } \ } /* some constants for the PRF */