<p></p>
<p><b>@benpicco</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16702#discussion_r710127728">sys/ut_process/ut_process.c</a>:</p>
<pre style='color:#555'>> +        }
+    }
+    for (const char *c = var->value; *c != '\0'; c++) {
+        char enc[sizeof("%00")];
+        size_t enc_len;
+
+        if (has_reserved) {
+            enc_len = _enc_reserved(*c, enc);
+        }
+        else {
+            enc_len = _enc_unreserved(*c, enc);
+        }
+        res = _copy_str(enc, enc_len, &uri[uri_idx], uri_len - uri_idx);
+        if (res < 0) {
+            DEBUG("ut_process: %p(%u) does not fit value encoding %.*s\n",
+                  (void *)uri, (unsigned)uri_len, enc_len, enc);
</pre>

⬇️ Suggested change
<pre style="color: #555">-                  (void *)uri, (unsigned)uri_len, enc_len, enc);
+                  (void *)uri, (unsigned)uri_len, (unsigned)enc_len, enc);
</pre>


<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16702#discussion_r710134950">sys/include/ut_process.h</a>:</p>
<pre style='color:#555'>> + * @param[in] vars_len      The length of @p vars.
+ * @param[out] uri          The resulting URI.
+ * @param[in, out] uri_len  The maximum length for @p uri on in, the actual
+ *                          length of @p uri on out.
+ *
+ * @return  The length of @p uri on success
+ * @return  -EINVAL, when @p ut is not parseable.
+ * @return  -ENOBUFS, when @p uri_len is too small to fit the resulting URI.
+ *          Potentially broken data will be written to @p uri.
+ */
+int ut_process_extend(const char *ut, size_t ut_len,
+                      const ut_process_var_t *vars, size_t vars_len,
+                      char *uri, size_t *uri_len);
+
+/**
+ * @brief   Extends a URI template by a given value set
</pre>
<p>Description is the same as for <code>ut_process_extend()</code></p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16702#discussion_r710141823">sys/include/ut_process.h</a>:</p>
<pre style='color:#555'>> +#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief   Name-value-pair of a variable for URI template extension
+ */
+typedef struct {
+    const char *name;       /**< name of the variable */
+    const char *value;      /**< value for the variable */
+} ut_process_var_t;
+
+/**
+ * @brief   Extends a URI template by a given value set
</pre>
<p>What does 'Extend' mean? Since this is the only function this module provides, I would expect it also does some template matching?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16702#pullrequestreview-756313866">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYFL7C3V63MI7YRFM4TUCHZWPANCNFSM5BORGUDQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABE7WYC3UEVUO2Q6IECDXNLUCHZWPA5CNFSM5BORGUD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFUKG6CQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16702#pullrequestreview-756313866",
"url": "https://github.com/RIOT-OS/RIOT/pull/16702#pullrequestreview-756313866",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>