diff options
| author | Toomas Soome <tsoome@me.com> | 2018-10-21 14:54:57 +0300 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2019-09-30 22:58:52 +0300 |
| commit | e81f5104293f278cbf9b239692af80ee10885830 (patch) | |
| tree | 75afbc3dc2fb3dfd25175e382e58950e3b86d0cb /usr/src/uts/common/io/cryptmod.c | |
| parent | bbe1f46d73a73e54a242bb59596e2daf4e619fe3 (diff) | |
| download | illumos-joyent-e81f5104293f278cbf9b239692af80ee10885830.tar.gz | |
11723 cryptmod: cast between incompatible function types
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/io/cryptmod.c')
| -rw-r--r-- | usr/src/uts/common/io/cryptmod.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/usr/src/uts/common/io/cryptmod.c b/usr/src/uts/common/io/cryptmod.c index e2315e8e9e..0975121d09 100644 --- a/usr/src/uts/common/io/cryptmod.c +++ b/usr/src/uts/common/io/cryptmod.c @@ -67,8 +67,8 @@ * Function prototypes. */ static int cryptmodopen(queue_t *, dev_t *, int, int, cred_t *); -static void cryptmodrput(queue_t *, mblk_t *); -static void cryptmodwput(queue_t *, mblk_t *); +static int cryptmodrput(queue_t *, mblk_t *); +static int cryptmodwput(queue_t *, mblk_t *); static int cryptmodclose(queue_t *, int, cred_t *); static int cryptmodwsrv(queue_t *); static int cryptmodrsrv(queue_t *); @@ -92,7 +92,7 @@ static struct module_info cryptmod_minfo = { }; static struct qinit cryptmod_rinit = { - (int (*)())cryptmodrput, /* qi_putp */ + cryptmodrput, /* qi_putp */ cryptmodrsrv, /* qi_svc */ cryptmodopen, /* qi_qopen */ cryptmodclose, /* qi_qclose */ @@ -102,7 +102,7 @@ static struct qinit cryptmod_rinit = { }; static struct qinit cryptmod_winit = { - (int (*)())cryptmodwput, /* qi_putp */ + cryptmodwput, /* qi_putp */ cryptmodwsrv, /* qi_srvp */ NULL, /* qi_qopen */ NULL, /* qi_qclose */ @@ -3254,7 +3254,7 @@ start_stream(queue_t *wq, mblk_t *mp, uchar_t dir) * Write-side put procedure. Its main task is to detect ioctls and * FLUSH operations. Other message types are passed on through. */ -static void +static int cryptmodwput(queue_t *wq, mblk_t *mp) { struct iocblk *iocp; @@ -3267,7 +3267,7 @@ cryptmodwput(queue_t *wq, mblk_t *mp) (tmi->ready & CRYPT_WRITE_READY) && tmi->enc_data.method == CRYPT_METHOD_NONE) { putnext(wq, mp); - return; + return (0); } /* else, put it in the service queue */ if (!putq(wq, mp)) { @@ -3345,7 +3345,7 @@ cryptmodwput(queue_t *wq, mblk_t *mp) stopdir = (uint32_t *)mp->b_cont->b_rptr; if (!CR_DIRECTION_OK(*stopdir)) { miocnak(wq, mp, 0, EINVAL); - return; + return (0); } /* disable the queues until further notice */ @@ -3387,12 +3387,13 @@ cryptmodwput(queue_t *wq, mblk_t *mp) if (wq->q_first != NULL || !canputnext(wq)) { if (!putq(wq, mp)) freemsg(mp); - return; + return (0); } } putnext(wq, mp); break; } + return (0); } /* @@ -3792,7 +3793,7 @@ cryptmodrsrv(queue_t *q) /* * Read-side put procedure. */ -static void +static int cryptmodrput(queue_t *rq, mblk_t *mp) { switch (mp->b_datap->db_type) { @@ -3812,10 +3813,11 @@ cryptmodrput(queue_t *rq, mblk_t *mp) if (rq->q_first != NULL || !canputnext(rq)) { if (!putq(rq, mp)) freemsg(mp); - return; + return (0); } } putnext(rq, mp); break; } + return (0); } |
