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

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/11057#discussion_r329552401">sys/net/application_layer/nanocoap/nanocoap.c</a>:</p>
<pre style='color:#555'>> @@ -614,20 +614,6 @@ size_t coap_put_option(uint8_t *buf, uint16_t lastonum, uint16_t onum, const uin
     return (size_t)n;
 }
 
-size_t coap_put_option_ct(uint8_t *buf, uint16_t lastonum, uint16_t content_type)
-{
-    if (content_type == 0) {
-        return coap_put_option(buf, lastonum, COAP_OPT_CONTENT_FORMAT, NULL, 0);
-    }
-    else if (content_type <= 255) {
-        uint8_t tmp = content_type;
-        return coap_put_option(buf, lastonum, COAP_OPT_CONTENT_FORMAT, &tmp, sizeof(tmp));
-    }
-    else {
-        return coap_put_option(buf, lastonum, COAP_OPT_CONTENT_FORMAT, (uint8_t *)&content_type, sizeof(content_type));
-    }
-}
-
 static unsigned _size2szx(size_t size)
</pre>
<p>Yes, use of the enum would require modification of the slicer. I will defer any changes there. Eventually, I would like to see a "payload writer" that uses blockwise by default. That would be a good time to revisit the capabilities of the slicer.</p>
<p>Thanks for the reference to the builtin functions. I have not used them before. It looks like  bitarithm_lsb() wraps the use of the clz feature based on availability, so that's what I went with. Let me know if there is a better way.</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/11057?email_source=notifications&email_token=ABE7WYGH4PSUNTOSIMCXCMTQMHXI7A5CNFSM4GZ2RUZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGKHFSA#discussion_r329552401">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBXY7YNHGRQV7H6EXTQMHXI7ANCNFSM4GZ2RUZA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYFL7P4XGMXSWYTDMOTQMHXI7A5CNFSM4GZ2RUZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGKHFSA.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/11057?email_source=notifications\u0026email_token=ABE7WYGH4PSUNTOSIMCXCMTQMHXI7A5CNFSM4GZ2RUZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGKHFSA#discussion_r329552401",
"url": "https://github.com/RIOT-OS/RIOT/pull/11057?email_source=notifications\u0026email_token=ABE7WYGH4PSUNTOSIMCXCMTQMHXI7A5CNFSM4GZ2RUZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCGKHFSA#discussion_r329552401",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>