summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-10-20 10:25:46 +0300
committerToomas Soome <tsoome@me.com>2019-03-15 22:49:25 +0200
commite2b861771c2991875108755a59b246b86f928eab (patch)
tree14e8fa40d275548bf0b9839238b6588f324a963a
parentff2c0cbf8b71c56c475188b2be1d96686bc645e9 (diff)
downloadillumos-joyent-e2b861771c2991875108755a59b246b86f928eab.tar.gz
10490 ptm: cast between incompatible function types
Reviewed by: Gergő Doma <domag02@gmail.com> Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: C Fraire <cfraire@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/ptm.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/usr/src/uts/common/io/ptm.c b/usr/src/uts/common/io/ptm.c
index d9ec6cc585..bc8c17bedd 100644
--- a/usr/src/uts/common/io/ptm.c
+++ b/usr/src/uts/common/io/ptm.c
@@ -22,7 +22,7 @@
* Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
@@ -146,9 +146,9 @@ int ptm_debug = 0;
static int ptmopen(queue_t *, dev_t *, int, int, cred_t *);
static int ptmclose(queue_t *, int, cred_t *);
-static void ptmwput(queue_t *, mblk_t *);
-static void ptmrsrv(queue_t *);
-static void ptmwsrv(queue_t *);
+static int ptmwput(queue_t *, mblk_t *);
+static int ptmrsrv(queue_t *);
+static int ptmwsrv(queue_t *);
/*
* Master Stream Pseudo Terminal Module: stream data structure definitions
@@ -165,7 +165,7 @@ static struct module_info ptm_info = {
static struct qinit ptmrint = {
NULL,
- (int (*)()) ptmrsrv,
+ ptmrsrv,
ptmopen,
ptmclose,
NULL,
@@ -174,8 +174,8 @@ static struct qinit ptmrint = {
};
static struct qinit ptmwint = {
- (int (*)()) ptmwput,
- (int (*)()) ptmwsrv,
+ ptmwput,
+ ptmwsrv,
NULL,
NULL,
NULL,
@@ -450,7 +450,7 @@ ptmclose(queue_t *rqp, int flag, cred_t *credp)
/*
* The wput procedure will only handle ioctl and flush messages.
*/
-static void
+static int
ptmwput(queue_t *qp, mblk_t *mp)
{
struct pt_ttys *ptmp;
@@ -508,7 +508,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
DBG(("got M_IOCTL but no slave\n"));
miocnak(qp, mp, 0, EINVAL);
PT_EXIT_READ(ptmp);
- return;
+ return (0);
}
(void) putq(qp, mp);
break;
@@ -595,7 +595,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
qreply(qp, mp);
}
PT_EXIT_READ(ptmp);
- return;
+ return (0);
}
DBG(("put msg on master's write queue\n"));
(void) putq(qp, mp);
@@ -603,6 +603,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
}
DBG(("return from ptmwput()\n"));
PT_EXIT_READ(ptmp);
+ return (0);
}
@@ -611,7 +612,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
* slave to send any messages queued on its write side to
* the read side of this master.
*/
-static void
+static int
ptmrsrv(queue_t *qp)
{
struct pt_ttys *ptmp;
@@ -626,6 +627,7 @@ ptmrsrv(queue_t *qp)
}
PT_EXIT_READ(ptmp);
DBG(("leaving ptmrsrv\n"));
+ return (0);
}
@@ -635,11 +637,11 @@ ptmrsrv(queue_t *qp)
* cannot be sent, leave them on this queue. If priority
* messages on this queue, send them to slave no matter what.
*/
-static void
+static int
ptmwsrv(queue_t *qp)
{
struct pt_ttys *ptmp;
- mblk_t *mp;
+ mblk_t *mp;
DBG(("entering ptmwsrv\n"));
ASSERT(qp->q_ptr);
@@ -649,7 +651,7 @@ ptmwsrv(queue_t *qp)
if ((mp = getq(qp)) == NULL) {
/* If there are no messages there's nothing to do. */
DBG(("leaving ptmwsrv (no messages)\n"));
- return;
+ return (0);
}
PT_ENTER_READ(ptmp);
@@ -676,7 +678,7 @@ ptmwsrv(queue_t *qp)
qreply(qp, mp);
}
PT_EXIT_READ(ptmp);
- return;
+ return (0);
}
/*
* while there are messages on this write queue...
@@ -701,4 +703,5 @@ ptmwsrv(queue_t *qp)
} while ((mp = getq(qp)) != NULL);
DBG(("leaving ptmwsrv\n"));
PT_EXIT_READ(ptmp);
+ return (0);
}