Lines Matching refs:buf
78 void rand_fill(uint8_t *buf, size_t count) in rand_fill() argument
82 *buf++ = rand_byte(); in rand_fill()
87 size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag) in rand_fill_protobuf() argument
89 pb_ostream_t stream = pb_ostream_from_buffer(buf, max_bytes); in rand_fill_protobuf()
120 uint8_t *buf; in rand_fill_protobuf() local
127 buf = malloc(len); in rand_fill_protobuf()
129 rand_fill(buf, len); in rand_fill_protobuf()
130 pb_write(&stream, buf, len); in rand_fill_protobuf()
131 free(buf); in rand_fill_protobuf()
139 void rand_mess(uint8_t *buf, size_t count) in rand_mess() argument
148 rand_fill(buf + s, l); in rand_mess()
155 int x = buf[a]; in rand_mess()
156 buf[a] = buf[b]; in rand_mess()
157 buf[b] = x; in rand_mess()
164 memcpy(buf + s + l, buf + s, l); in rand_mess()
171 rand_fill_protobuf(buf + s, l, count - s, 1); in rand_mess()