drivers: add mising braces to single line if statements
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/drivers/modem/simcom-sim7080.c b/drivers/modem/simcom-sim7080.c
index ebe8d9f..f92a885 100644
--- a/drivers/modem/simcom-sim7080.c
+++ b/drivers/modem/simcom-sim7080.c
@@ -709,13 +709,15 @@
if (service) {
port = atoi(service);
- if (port < 1 || port > USHRT_MAX)
+ if (port < 1 || port > USHRT_MAX) {
return DNS_EAI_SERVICE;
+ }
}
if (port > 0U) {
- if (dns_result.ai_family == AF_INET)
+ if (dns_result.ai_family == AF_INET) {
net_sin(&dns_result_addr)->sin_port = htons(port);
+ }
}
/* Check if node is an IP address */
@@ -1809,14 +1811,15 @@
*/
static uint8_t mdm_pdu_decode_ascii(char byte)
{
- if ((byte >= '0') && (byte <= '9'))
+ if ((byte >= '0') && (byte <= '9')) {
return byte - '0';
- else if ((byte >= 'A') && (byte <= 'F'))
+ } else if ((byte >= 'A') && (byte <= 'F')) {
return byte - 'A' + 10;
- else if ((byte >= 'a') && (byte <= 'f'))
+ } else if ((byte >= 'a') && (byte <= 'f')) {
return byte - 'a' + 10;
- else
+ } else {
return 255;
+ }
}
/**