From e956e80c1fa1cc8aefcb1533e5acf5cf3c8ffdd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 10 May 2020 12:56:01 +0200 Subject: Style: clang-format: Disable AllowShortIfStatementsOnASingleLine Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet. --- modules/mbedtls/packet_peer_mbed_dtls.cpp | 6 ++++-- modules/mbedtls/stream_peer_mbedtls.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) mode change 100755 => 100644 modules/mbedtls/packet_peer_mbed_dtls.cpp mode change 100755 => 100644 modules/mbedtls/stream_peer_mbedtls.cpp (limited to 'modules/mbedtls') diff --git a/modules/mbedtls/packet_peer_mbed_dtls.cpp b/modules/mbedtls/packet_peer_mbed_dtls.cpp old mode 100755 new mode 100644 index b2aa5f5827..37477e1246 --- a/modules/mbedtls/packet_peer_mbed_dtls.cpp +++ b/modules/mbedtls/packet_peer_mbed_dtls.cpp @@ -36,7 +36,8 @@ int PacketPeerMbedDTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) { - if (buf == nullptr || len <= 0) return 0; + if (buf == nullptr || len <= 0) + return 0; PacketPeerMbedDTLS *sp = (PacketPeerMbedDTLS *)ctx; @@ -53,7 +54,8 @@ int PacketPeerMbedDTLS::bio_send(void *ctx, const unsigned char *buf, size_t len int PacketPeerMbedDTLS::bio_recv(void *ctx, unsigned char *buf, size_t len) { - if (buf == nullptr || len <= 0) return 0; + if (buf == nullptr || len <= 0) + return 0; PacketPeerMbedDTLS *sp = (PacketPeerMbedDTLS *)ctx; diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp old mode 100755 new mode 100644 index 983095c536..af36b29dac --- a/modules/mbedtls/stream_peer_mbedtls.cpp +++ b/modules/mbedtls/stream_peer_mbedtls.cpp @@ -35,7 +35,8 @@ int StreamPeerMbedTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) { - if (buf == nullptr || len <= 0) return 0; + if (buf == nullptr || len <= 0) + return 0; StreamPeerMbedTLS *sp = (StreamPeerMbedTLS *)ctx; @@ -54,7 +55,8 @@ int StreamPeerMbedTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) int StreamPeerMbedTLS::bio_recv(void *ctx, unsigned char *buf, size_t len) { - if (buf == nullptr || len <= 0) return 0; + if (buf == nullptr || len <= 0) + return 0; StreamPeerMbedTLS *sp = (StreamPeerMbedTLS *)ctx; -- cgit v1.2.3