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

Sebastian Meiling notifications at github.com
Wed May 22 11:58:05 CEST 2019


smlng requested changes 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 */

last issue: coding style (see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions):

```suggestion
            while (!(dev->LSR & (1 << 5))) {}       /* wait for THRE bit to be set */
```

-- 
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#pullrequestreview-240527733
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190522/d4643c82/attachment.html>


More information about the notifications mailing list