[riot-notifications] [RIOT-OS/RIOT] net/nanocoap: Packet API return error if buffer full (#10931)

Ken Bannister notifications at github.com
Mon Mar 18 17:59:43 CET 2019


kb2ma commented on this pull request.



>  #endif
 
-    if (hdrlen > 0) {
-        coap_pkt_init(pdu, buf, len - GCOAP_REQ_OPTIONS_BUF, hdrlen);
+    if (res > 0) {

I expect that originally I was being cautious due to the return type of coap_build_hdr(). Looking at its code and documentation, I agree there is no way it will be negative. Will fix.

-- 
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/10931#discussion_r266543450
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190318/590cfabd/attachment.html>


More information about the notifications mailing list