Lines Matching defs:size
21 coap_new_string(size_t size) {
24 if (size >= MEMP_LEN_COAPSTRING) {
25 coap_log_crit("coap_new_string: size too large (%zu +1 > MEMP_LEN_COAPSTRING)\n",
26 size);
30 assert(size+1 != 0);
32 sizeof(coap_string_t) + size + 1);
40 s->s[size] = '\000';
41 s->length = size;
51 coap_new_str_const(const uint8_t *data, size_t size) {
52 coap_string_t *s = coap_new_string(size);
55 memcpy(s->s, data, size);
56 s->length = size;
77 coap_new_binary(size_t size) {
78 return (coap_binary_t *)coap_new_string(size);
82 coap_resize_binary(coap_binary_t *s, size_t size) {
85 coap_binary_t *new = coap_new_binary(size);
95 sizeof(coap_binary_t) + size);
98 new->length = size;
110 coap_new_bin_const(const uint8_t *data, size_t size) {
111 coap_string_t *s = coap_new_string(size);
114 memcpy(s->s, data, size);
115 s->length = size;