Make async_read and async_write return -1 on failure.
authorKurt Roeckx <kurt@roeckx.be>
Sun, 20 Nov 2016 22:22:14 +0000 (23:22 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Mon, 21 Nov 2016 20:59:35 +0000 (21:59 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
GH: #1966

test/asynciotest.c

index 23d0907dc9151ece990d757e68ff3012bd1d3695..0d382d70f6ef5db1e88588bca3565740ef9cb458 100644 (file)
@@ -85,7 +85,7 @@ static int async_free(BIO *bio)
 static int async_read(BIO *bio, char *out, int outl)
 {
     struct async_ctrs *ctrs;
-    int ret = 0;
+    int ret = -1;
     BIO *next = BIO_next(bio);
 
     if (outl <= 0)
@@ -120,7 +120,7 @@ static int async_read(BIO *bio, char *out, int outl)
 static int async_write(BIO *bio, const char *in, int inl)
 {
     struct async_ctrs *ctrs;
-    int ret = 0;
+    int ret = -1;
     size_t written = 0;
     BIO *next = BIO_next(bio);