[riot-notifications] [RIOT-OS/RIOT] cpu/lpc1768: fix uninitialized variable (#9908)

José Alamos notifications at github.com
Wed May 22 13:42:34 CEST 2019


jia200x commented on this pull request.



> @@ -157,9 +157,11 @@ void uart_write(uart_t uart, const uint8_t *data, size_t len)
             return;
     }
 
-    for (size_t i = 0; i < len; i++) {
-        while (!(dev->LSR & (1 << 5)));       /* wait for THRE bit to be set */
-        dev->THR = data[i];
+    if (dev) {
+        for (size_t i = 0; i < len; i++) {
+            while (!(dev->LSR & (1 << 5)));       /* wait for THRE bit to be set */

done!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/9908#discussion_r286445975
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190522/d54d705c/attachment.html>


More information about the notifications mailing list