Lines Matching refs:rlen
234 size_t rlen; in sshbuf_set_max_size() local
251 rlen = SSHBUF_SIZE_INIT; in sshbuf_set_max_size()
253 rlen = ROUNDUP(buf->size, SSHBUF_SIZE_INC); in sshbuf_set_max_size()
254 if (rlen > max_size) in sshbuf_set_max_size()
255 rlen = max_size; in sshbuf_set_max_size()
257 SSHBUF_DBG(("new alloc = %zu", rlen)); in sshbuf_set_max_size()
258 if ((dp = realloc(buf->d, rlen)) == NULL) in sshbuf_set_max_size()
261 buf->alloc = rlen; in sshbuf_set_max_size()
321 size_t rlen, need; in sshbuf_allocate() local
342 rlen = ROUNDUP(buf->alloc + need, SSHBUF_SIZE_INC); in sshbuf_allocate()
343 SSHBUF_DBG(("need %zu initial rlen %zu", need, rlen)); in sshbuf_allocate()
344 if (rlen > buf->max_size) in sshbuf_allocate()
345 rlen = buf->alloc + need; in sshbuf_allocate()
346 SSHBUF_DBG(("adjusted rlen %zu", rlen)); in sshbuf_allocate()
347 if ((dp = realloc(buf->d, rlen)) == NULL) { in sshbuf_allocate()
351 buf->alloc = rlen; in sshbuf_allocate()