[riot-notifications] [RIOT-OS/RIOT] tests/gnrc_udp: Replace atoi() by strtol(). (#11356)

Martine Lenders notifications at github.com
Tue Apr 9 10:38:50 CEST 2019


miri64 requested changes on this pull request.



>          puts("Error: unable to parse destination port");
         return;
     }
 
-    data_len = atoi(data_len_str);
-    if (data_len == 0) {
+    data_len = strtoul(data_len_str, &conversion_end, 0);
+    if (*conversion_end != '\0') {

Sleeping over it, let's just focus on fixing this one for now for the release. The other stuff should also be fixed in applications like [`examples/gnrc_networking`](https://github.com/RIOT-OS/RIOT/blob/7484af6d369a6af44671e1564ee8457b8f033aba/examples/gnrc_networking/udp.c)

-- 
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/11356#pullrequestreview-224264120
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190409/1b720916/attachment.html>


More information about the notifications mailing list