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

Ken Bannister notifications at github.com
Thu Jun 27 04:56:13 CEST 2019


kb2ma commented on this pull request.



> +    if (!*output) {
+        DEBUG("Path start not found\n");
+        return CLIF_NOT_FOUND;
+    }
+    *output += 1;
+
+    target_end = memchr(*output, LF_PATH_END_C, (input + input_len) - *output);
+    if (!target_end) {
+        DEBUG("Path end not found\n");
+        return CLIF_NOT_FOUND;
+    }
+    ssize_t res = target_end - *output;
+    return res;
+}
+
+ssize_t clif_get_param(char *input, size_t input_len, clif_param_t *param)

Does it make sense to require a non-null param? This would be more consistent with the other 'clif_get...' functions. It also would save six 'if param' conditionals. For `clif_decode_link()` you could just pass a dummy param.

-- 
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-254977104
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190626/e11caf20/attachment.html>


More information about the notifications mailing list