[riot-notifications] [RIOT-OS/RIOT] sys: Add Link Format module (#11189)

Aiman Ismail notifications at github.com
Tue Mar 19 16:11:05 CET 2019


pokgak requested changes on this pull request.

Looks good to me. Left some comment on the changes in gcoap.

>                  if (pos) {
-                    out[pos++] = ',';
+                    pos += link_format_add_link_separator(&out[pos],

This will decrement the value of pos if the function returns LINK_FORMAT_NO_SPACE when output buffer full. Check the return value first before adding to pos?

>                  }
-                out[pos++] = '<';
-                memcpy(&out[pos], resource->path, path_len);
-                pos += path_len;
-                out[pos++] = '>';
+                pos += link_format_add_target(resource->path, &out[pos],

Same as last comment, pos will be decremented instead if output buffer full.

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


More information about the notifications mailing list