Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b746f09

Browse files
authoredOct 29, 2024··
ci(pre-commit): Apply automatic fixes
1 parent d80c71b commit b746f09

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed
 

‎cores/esp32/esp32-hal-time.c

+9-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "esp_netif.h"
1919

2020
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
21-
#include "lwip/priv/tcpip_priv.h"
21+
#include "lwip/priv/tcpip_priv.h"
2222
#endif
2323

2424
static void setTimeZone(long offset, int daylight) {
@@ -56,8 +56,9 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char *server1,
5656
}
5757

5858
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
59-
if (!sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER))
59+
if (!sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) {
6060
LOCK_TCPIP_CORE();
61+
}
6162
#endif
6263

6364
sntp_setoperatingmode(SNTP_OPMODE_POLL);
@@ -67,8 +68,9 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char *server1,
6768
sntp_init();
6869

6970
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
70-
if (sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER))
71+
if (sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) {
7172
UNLOCK_TCPIP_CORE();
73+
}
7274
#endif
7375

7476
setTimeZone(-gmtOffset_sec, daylightOffset_sec);
@@ -86,8 +88,9 @@ void configTzTime(const char *tz, const char *server1, const char *server2, cons
8688
}
8789

8890
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
89-
if (!sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER))
91+
if (!sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) {
9092
LOCK_TCPIP_CORE();
93+
}
9194
#endif
9295

9396
sntp_setoperatingmode(SNTP_OPMODE_POLL);
@@ -97,8 +100,9 @@ void configTzTime(const char *tz, const char *server1, const char *server2, cons
97100
sntp_init();
98101

99102
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
100-
if (sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER))
103+
if (sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) {
101104
UNLOCK_TCPIP_CORE();
105+
}
102106
#endif
103107

104108
setenv("TZ", tz, 1);

0 commit comments

Comments
 (0)
Please sign in to comment.