From 63638116bbacd9d275b00b4602da8dca12542a53 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Sat, 20 Oct 2018 00:09:39 +0300 Subject: 10487 nca: cast between incompatible function types Reviewed by: Gergő Doma Reviewed by: C Fraire Approved by: Dan McDonald MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/uts/common/inet/nca/ncaddi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/usr/src/uts/common/inet/nca/ncaddi.c b/usr/src/uts/common/inet/nca/ncaddi.c index e4fa85ef00..f02924d131 100644 --- a/usr/src/uts/common/inet/nca/ncaddi.c +++ b/usr/src/uts/common/inet/nca/ncaddi.c @@ -90,14 +90,15 @@ nca_close(queue_t *q, int flags __unused, cred_t *credp __unused) return (0); } -static void +static int nca_rput(queue_t *q, mblk_t *mp) { /* Passthrough */ putnext(q, mp); + return (0); } -static void +static int nca_wput(queue_t *q, mblk_t *mp) { struct iocblk *iocp; @@ -106,11 +107,11 @@ nca_wput(queue_t *q, mblk_t *mp) iocp = (struct iocblk *)mp->b_rptr; if (DB_TYPE(mp) == M_IOCTL && iocp->ioc_cmd == NCA_SET_IF) { miocnak(q, mp, 0, ENOTSUP); - return; + return (0); } /* Module, passthrough */ putnext(q, mp); - return; + return (0); } switch (DB_TYPE(mp)) { @@ -121,7 +122,7 @@ nca_wput(queue_t *q, mblk_t *mp) case ND_GET: if (! nd_getset(q, nca_g_nd, mp)) { miocnak(q, mp, 0, ENOENT); - return; + return (0); } qreply(q, mp); break; @@ -134,6 +135,7 @@ nca_wput(queue_t *q, mblk_t *mp) freemsg(mp); break; } + return (0); } static struct module_info info = { @@ -141,11 +143,11 @@ static struct module_info info = { }; static struct qinit rinit = { - (pfi_t)nca_rput, NULL, nca_open, nca_close, NULL, &info + nca_rput, NULL, nca_open, nca_close, NULL, &info }; static struct qinit winit = { - (pfi_t)nca_wput, NULL, nca_open, nca_close, NULL, &info + nca_wput, NULL, nca_open, nca_close, NULL, &info }; struct streamtab ncainfo = { -- cgit v1.2.3