Skip to content

Commit 654aabc

Browse files
authored
Update picow_ntp_client.c (#391)
Fix "invalid conversion from 'void*' to 'NTP_T*'"
1 parent 8df09c9 commit 654aabc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pico_w/wifi/ntp_client/picow_ntp_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static void ntp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_ad
108108

109109
// Perform initialisation
110110
static NTP_T* ntp_init(void) {
111-
NTP_T *state = calloc(1, sizeof(NTP_T));
111+
NTP_T *state = (NTP_T*)calloc(1, sizeof(NTP_T));
112112
if (!state) {
113113
printf("failed to allocate state\n");
114114
return NULL;
@@ -183,4 +183,4 @@ int main() {
183183
run_ntp_test();
184184
cyw43_arch_deinit();
185185
return 0;
186-
}
186+
}

0 commit comments

Comments
 (0)