Lines Matching refs:bufp
70 digest_buf_t *bufp; in emulate_buf_init() local
76 bufp = opp->context; in emulate_buf_init()
78 if (bufp != NULL) { in emulate_buf_init()
79 bufp->indata_len = 0; in emulate_buf_init()
84 if (buflen > bufp->buf_len) { in emulate_buf_init()
85 free(bufp->buf); in emulate_buf_init()
86 bufp->buf = NULL; in emulate_buf_init()
89 bufp = opp->context = calloc(1, sizeof (digest_buf_t)); in emulate_buf_init()
90 if (bufp == NULL) { in emulate_buf_init()
95 if (bufp->buf == NULL) { in emulate_buf_init()
96 bufp->buf = malloc(buflen); in emulate_buf_init()
97 if (bufp->buf == NULL) { in emulate_buf_init()
98 free(bufp); in emulate_buf_init()
102 bufp->buf_len = buflen; in emulate_buf_init()
156 digest_buf_t *bufp; in emulate_update() local
181 bufp = opp->context; in emulate_update()
182 if (bufp == NULL) { in emulate_update()
187 if (bufp->indata_len + ulPartLen > maxlen) { in emulate_update()
189 } else if (ulPartLen > (bufp->buf_len - bufp->indata_len)) { in emulate_update()
190 int siz = ulPartLen < bufp->buf_len ? in emulate_update()
191 bufp->buf_len * 2 : bufp->buf_len + ulPartLen; in emulate_update()
192 uint8_t *old = bufp->buf; in emulate_update()
194 bufp->buf = realloc(bufp->buf, siz); in emulate_update()
195 if (bufp->buf == NULL) { in emulate_update()
197 bufp->buf = old; in emulate_update()
200 bufp->buf_len = siz; in emulate_update()
217 DO_SOFT_UPDATE(opp, bufp->buf, bufp->indata_len, opflag); in emulate_update()
227 bcopy(pPart, bufp->buf + bufp->indata_len, ulPartLen); in emulate_update()
228 bufp->indata_len += ulPartLen; in emulate_update()