Lines Matching refs:rlen
222 size_t rlen; in sshbuf_set_max_size() local
239 rlen = SSHBUF_SIZE_INIT; in sshbuf_set_max_size()
241 rlen = ROUNDUP(buf->size, SSHBUF_SIZE_INC); in sshbuf_set_max_size()
242 if (rlen > max_size) in sshbuf_set_max_size()
243 rlen = max_size; in sshbuf_set_max_size()
244 SSHBUF_DBG(("new alloc = %zu", rlen)); in sshbuf_set_max_size()
245 if ((dp = recallocarray(buf->d, buf->alloc, rlen, 1)) == NULL) in sshbuf_set_max_size()
248 buf->alloc = rlen; in sshbuf_set_max_size()
308 size_t rlen, need; in sshbuf_allocate() local
329 rlen = ROUNDUP(buf->alloc + need, SSHBUF_SIZE_INC); in sshbuf_allocate()
330 SSHBUF_DBG(("need %zu initial rlen %zu", need, rlen)); in sshbuf_allocate()
331 if (rlen > buf->max_size) in sshbuf_allocate()
332 rlen = buf->alloc + need; in sshbuf_allocate()
333 SSHBUF_DBG(("adjusted rlen %zu", rlen)); in sshbuf_allocate()
334 if ((dp = recallocarray(buf->d, buf->alloc, rlen, 1)) == NULL) { in sshbuf_allocate()
338 buf->alloc = rlen; in sshbuf_allocate()