]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - net/sntp.c
net: Refactor to protect access to the NetState variable
[people/ms/u-boot.git] / net / sntp.c
index 07d036d41de85ab14108217fa1f63ada616dc9f6..48ce07f18cdb05c5dbd7ffc99eaab9099cf5957b 100644 (file)
@@ -45,7 +45,7 @@ static void
 SntpTimeout(void)
 {
        puts("Timeout\n");
-       NetState = NETLOOP_FAIL;
+       net_set_state(NETLOOP_FAIL);
        return;
 }
 
@@ -76,7 +76,7 @@ SntpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
                tm.tm_year, tm.tm_mon, tm.tm_mday,
                tm.tm_hour, tm.tm_min, tm.tm_sec);
 
-       NetState = NETLOOP_SUCCESS;
+       net_set_state(NETLOOP_SUCCESS);
 }
 
 void