Lines Matching refs:ret
41 long ret = inret; in bio_call_callback() local
71 ret = b->callback(b, oper, argp, argi, argl, inret); in bio_call_callback()
73 if (ret > 0 && (oper & BIO_CB_RETURN) && bareoper != BIO_CB_CTRL) { in bio_call_callback()
74 *processed = (size_t)ret; in bio_call_callback()
75 ret = 1; in bio_call_callback()
78 return ret; in bio_call_callback()
121 int ret; in BIO_free() local
126 if (CRYPTO_DOWN_REF(&a->references, &ret) <= 0) in BIO_free()
130 if (ret > 0) in BIO_free()
132 REF_ASSERT_ISNT(ret < 0); in BIO_free()
135 ret = (int)bio_call_callback(a, BIO_CB_FREE, NULL, 0, 0, 0L, 1L, NULL); in BIO_free()
136 if (ret <= 0) in BIO_free()
264 int ret; in bio_read_intern() local
276 ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, in bio_read_intern()
278 return ret; in bio_read_intern()
285 ret = b->method->bread(b, data, dlen, readbytes); in bio_read_intern()
287 if (ret > 0) in bio_read_intern()
291 ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data, in bio_read_intern()
292 dlen, 0, 0L, ret, readbytes); in bio_read_intern()
295 if (ret > 0 && *readbytes > dlen) { in bio_read_intern()
300 return ret; in bio_read_intern()
306 int ret; in BIO_read() local
311 ret = bio_read_intern(b, data, (size_t)dlen, &readbytes); in BIO_read()
313 if (ret > 0) { in BIO_read()
315 ret = (int)readbytes; in BIO_read()
318 return ret; in BIO_read()
330 int ret; in bio_write_intern() local
347 ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, in bio_write_intern()
349 return ret; in bio_write_intern()
356 ret = b->method->bwrite(b, data, dlen, &local_written); in bio_write_intern()
358 if (ret > 0) in bio_write_intern()
362 ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data, in bio_write_intern()
363 dlen, 0, 0L, ret, &local_written); in bio_write_intern()
367 return ret; in bio_write_intern()
373 int ret; in BIO_write() local
378 ret = bio_write_intern(b, data, (size_t)dlen, &written); in BIO_write()
380 if (ret > 0) { in BIO_write()
382 ret = (int)written; in BIO_write()
385 return ret; in BIO_write()
398 size_t ret; in BIO_sendmmsg() local
420 ret = (size_t)bio_call_callback(b, BIO_CB_SENDMMSG, (void *)&args, in BIO_sendmmsg()
422 if (ret <= 0) in BIO_sendmmsg()
432 ret = b->method->bsendmmsg(b, msg, stride, num_msg, flags, msgs_processed); in BIO_sendmmsg()
435 ret = (size_t)bio_call_callback(b, BIO_CB_SENDMMSG | BIO_CB_RETURN, in BIO_sendmmsg()
436 (void *)&args, ret, 0, 0, ret, NULL); in BIO_sendmmsg()
438 return ret; in BIO_sendmmsg()
445 size_t ret; in BIO_recvmmsg() local
467 ret = bio_call_callback(b, BIO_CB_RECVMMSG, (void *)&args, in BIO_recvmmsg()
469 if (ret <= 0) in BIO_recvmmsg()
479 ret = b->method->brecvmmsg(b, msg, stride, num_msg, flags, msgs_processed); in BIO_recvmmsg()
482 ret = (size_t)bio_call_callback(b, BIO_CB_RECVMMSG | BIO_CB_RETURN, in BIO_recvmmsg()
483 (void *)&args, ret, 0, 0, ret, NULL); in BIO_recvmmsg()
485 return ret; in BIO_recvmmsg()
500 int ret; in BIO_puts() local
513 ret = (int)bio_call_callback(b, BIO_CB_PUTS, buf, 0, 0, 0L, 1L, NULL); in BIO_puts()
514 if (ret <= 0) in BIO_puts()
515 return ret; in BIO_puts()
523 ret = b->method->bputs(b, buf); in BIO_puts()
525 if (ret > 0) { in BIO_puts()
526 b->num_write += (uint64_t)ret; in BIO_puts()
527 written = ret; in BIO_puts()
528 ret = 1; in BIO_puts()
532 ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0, in BIO_puts()
533 0L, ret, &written); in BIO_puts()
535 if (ret > 0) { in BIO_puts()
538 ret = -1; in BIO_puts()
540 ret = (int)written; in BIO_puts()
544 return ret; in BIO_puts()
549 int ret; in BIO_gets() local
567 ret = (int)bio_call_callback(b, BIO_CB_GETS, buf, size, 0, 0L, 1, NULL); in BIO_gets()
568 if (ret <= 0) in BIO_gets()
569 return ret; in BIO_gets()
577 ret = b->method->bgets(b, buf, size); in BIO_gets()
579 if (ret > 0) { in BIO_gets()
580 readbytes = ret; in BIO_gets()
581 ret = 1; in BIO_gets()
585 ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size, in BIO_gets()
586 0, 0L, ret, &readbytes); in BIO_gets()
588 if (ret > 0) { in BIO_gets()
591 ret = -1; in BIO_gets()
593 ret = (int)readbytes; in BIO_gets()
596 return ret; in BIO_gets()
601 int ret = 0; in BIO_get_line() local
623 while (size-- > 1 && (ret = BIO_read(bio, ptr, 1)) > 0) in BIO_get_line()
627 return ret > 0 || BIO_eof(bio) ? ptr - buf : ret; in BIO_get_line()
662 long ret; in BIO_ctrl() local
672 ret = bio_call_callback(b, BIO_CB_CTRL, parg, 0, cmd, larg, 1L, NULL); in BIO_ctrl()
673 if (ret <= 0) in BIO_ctrl()
674 return ret; in BIO_ctrl()
677 ret = b->method->ctrl(b, cmd, larg, parg); in BIO_ctrl()
680 ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd, in BIO_ctrl()
681 larg, ret, NULL); in BIO_ctrl()
683 return ret; in BIO_ctrl()
688 long ret; in BIO_callback_ctrl() local
699 ret = bio_call_callback(b, BIO_CB_CTRL, (void *)&fp, 0, cmd, 0, 1L, in BIO_callback_ctrl()
701 if (ret <= 0) in BIO_callback_ctrl()
702 return ret; in BIO_callback_ctrl()
705 ret = b->method->callback_ctrl(b, cmd, fp); in BIO_callback_ctrl()
708 ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, (void *)&fp, 0, in BIO_callback_ctrl()
709 cmd, 0, ret, NULL); in BIO_callback_ctrl()
711 return ret; in BIO_callback_ctrl()
721 long ret = BIO_ctrl(bio, BIO_CTRL_PENDING, 0, NULL); in BIO_ctrl_pending() local
723 if (ret < 0) in BIO_ctrl_pending()
724 ret = 0; in BIO_ctrl_pending()
726 if (ret > SIZE_MAX) in BIO_ctrl_pending()
727 ret = SIZE_MAX; in BIO_ctrl_pending()
729 return (size_t)ret; in BIO_ctrl_pending()
734 long ret = BIO_ctrl(bio, BIO_CTRL_WPENDING, 0, NULL); in BIO_ctrl_wpending() local
736 if (ret < 0) in BIO_ctrl_wpending()
737 ret = 0; in BIO_ctrl_wpending()
739 if (ret > SIZE_MAX) in BIO_ctrl_wpending()
740 ret = SIZE_MAX; in BIO_ctrl_wpending()
742 return (size_t)ret; in BIO_ctrl_wpending()
766 BIO *ret; in BIO_pop() local
770 ret = b->next_bio; in BIO_pop()
781 return ret; in BIO_pop()
867 BIO *ret = NULL, *eoc = NULL, *bio, *new_bio; in BIO_dup_chain() local
896 if (ret == NULL) { in BIO_dup_chain()
898 ret = eoc; in BIO_dup_chain()
904 return ret; in BIO_dup_chain()
906 BIO_free_all(ret); in BIO_dup_chain()
969 int ret = BIO_socket_wait(fd, BIO_should_read(bio), max_time); in bio_wait() local
971 if (ret != -1) in bio_wait()
972 return ret; in bio_wait()