summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-10-21 15:34:22 +0300
committerToomas Soome <tsoome@me.com>2019-09-30 23:03:39 +0300
commitc6026c814721e22d6b8791b5bdfeeecb85ece59c (patch)
tree55ba1732c1a4fa137c5ceff272ca827992f69b5e
parentc4d76aa4b703811c0527424e3c63151eb77b9972 (diff)
downloadillumos-joyent-c6026c814721e22d6b8791b5bdfeeecb85ece59c.tar.gz
11725 tirdwr: cast between incompatible function types
Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/tirdwr.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/usr/src/uts/common/io/tirdwr.c b/usr/src/uts/common/io/tirdwr.c
index e42a17aeaf..b15c4752db 100644
--- a/usr/src/uts/common/io/tirdwr.c
+++ b/usr/src/uts/common/io/tirdwr.c
@@ -25,10 +25,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
-
-
-#pragma ident "%Z%%M% %I% %E% SMI" /* from S5R4 1.4 */
+/* All Rights Reserved */
/*
* Transport Interface Library read/write module - issue 1
@@ -76,8 +73,8 @@ static int check_strhead(queue_t *q);
* To save instructions, since STREAMS ignores the return value
* from these functions, they are defined as void here. Kind of icky, but...
*/
-static void tirdwrrput(queue_t *q, mblk_t *mp);
-static void tirdwrwput(queue_t *q, mblk_t *mp);
+static int tirdwrrput(queue_t *q, mblk_t *mp);
+static int tirdwrwput(queue_t *q, mblk_t *mp);
static struct module_info tirdwr_info = {
TIRDWR_ID,
@@ -89,8 +86,8 @@ static struct module_info tirdwr_info = {
};
static struct qinit tirdwrrinit = {
- (int (*)())tirdwrrput,
- (int (*)())NULL,
+ tirdwrrput,
+ NULL,
tirdwropen,
tirdwrclose,
nulldev,
@@ -99,8 +96,8 @@ static struct qinit tirdwrrinit = {
};
static struct qinit tirdwrwinit = {
- (int (*)())tirdwrwput,
- (int (*)())NULL,
+ tirdwrwput,
+ NULL,
tirdwropen,
tirdwrclose,
nulldev,
@@ -241,7 +238,7 @@ tirdwrclose(queue_t *q, int flag, cred_t *cr)
* driver downstream.
*/
-static void
+static int
tirdwrrput(queue_t *q, mblk_t *mp)
{
union T_primitives *pptr;
@@ -254,7 +251,7 @@ tirdwrrput(queue_t *q, mblk_t *mp)
if ((trwptr->trw_flags & FATAL) && !(trwptr->trw_flags & WAITACK)) {
freemsg(mp);
- return;
+ return (0);
}
switch (mp->b_datap->db_type) {
@@ -317,6 +314,7 @@ tirdwrrput(queue_t *q, mblk_t *mp)
break;
}
}
+ return (0);
}
@@ -325,7 +323,7 @@ tirdwrrput(queue_t *q, mblk_t *mp)
* This is called from the module or
* stream head upstream.
*/
-static void
+static int
tirdwrwput(queue_t *q, mblk_t *mp)
{
struct trw_trw *trwptr;
@@ -336,7 +334,7 @@ tirdwrwput(queue_t *q, mblk_t *mp)
if (trwptr->trw_flags & FATAL) {
freemsg(mp);
- return;
+ return (0);
}
switch (mp->b_datap->db_type) {
@@ -353,6 +351,7 @@ tirdwrwput(queue_t *q, mblk_t *mp)
send_fatal(q, mp);
break;
}
+ return (0);
}