increased size of argument type to support large option numbers

Note that the bit field for filters would grow very large if
COAP_MAX_OPT is set to larger values.
This commit is contained in:
Olaf Bergmann committed 2013-09-03 14:11:24 +02:00
1 parent ada296efaf
commit 3e47b66c29
1 file changed
+3 -3
+3 -3
View File
@@ -116,7 +116,7 @@ coap_option_filter_clear(coap_opt_filter_t f) {
* @return @c 1 if bit was set, @c -1 otherwise.
*/
inline static int
coap_option_setb(coap_opt_filter_t filter, unsigned char type) {
coap_option_setb(coap_opt_filter_t filter, unsigned short type) {
return bits_setb((uint8_t *)filter, sizeof(coap_opt_filter_t), type);
}
@@ -131,7 +131,7 @@ coap_option_setb(coap_opt_filter_t filter, unsigned char type) {
* @return @c 1 if bit was set, @c -1 otherwise.
*/
inline static int
coap_option_clrb(coap_opt_filter_t filter, unsigned char type) {
coap_option_clrb(coap_opt_filter_t filter, unsigned short type) {
return bits_clrb((uint8_t *)filter, sizeof(coap_opt_filter_t), type);
}
@@ -146,7 +146,7 @@ coap_option_clrb(coap_opt_filter_t filter, unsigned char type) {
* @return @c 1 if bit was set, @c 0 if not, @c -1 on error.
*/
inline static int
coap_option_getb(const coap_opt_filter_t filter, unsigned char type) {
coap_option_getb(const coap_opt_filter_t filter, unsigned short type) {
return bits_getb((uint8_t *)filter, sizeof(coap_opt_filter_t), type);
}