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

Ken Bannister notifications at github.com
Sat Jun 29 05:37:16 CEST 2019


kb2ma commented on this pull request.



> +    return 1;
+}
+
+ssize_t clif_add_param(clif_param_t *param, char *buf, size_t maxlen)
+{
+    assert(param && param->key);
+
+    param->key_len = strlen(param->key);
+    /* count param name size and separator ';' */
+    size_t req_space = param->key_len + 1;
+    size_t pos = 0;
+    int quoted = strcmp(param->key, LF_PARAM_SIZE) ? 1 : 0;
+
+    if (param->value) {
+        if (!param->value_len) {
+            param->value_len = strlen(param->value);

Is it reasonable to assume the value if 0-terminated? clif_param_t seems like more of an overlay on some buffer.

Whatever the outcome, it would be worthwhile to document in the header so the user knows what is required.

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


More information about the notifications mailing list