diff options
author | Toomas Soome <tsoome@me.com> | 2018-10-20 10:34:33 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-03-15 22:51:19 +0200 |
commit | 74d419caec602f7f32a3bdea419b7f3155d3eebc (patch) | |
tree | e9c0799cc8f6ef6cc638977661e950199e79cf5e | |
parent | e2b861771c2991875108755a59b246b86f928eab (diff) | |
download | illumos-joyent-74d419caec602f7f32a3bdea419b7f3155d3eebc.tar.gz |
10492 ptsl: cast between incompatible function types
Reviewed by: Gergő Doma <domag02@gmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/tty_pts.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/tty_pts.c b/usr/src/uts/common/io/tty_pts.c index 1ea7fed353..57f7a22978 100644 --- a/usr/src/uts/common/io/tty_pts.c +++ b/usr/src/uts/common/io/tty_pts.c @@ -76,7 +76,7 @@ static int ptslrserv(queue_t *); * from this function, it is defined as void here. Kind of icky, but... */ -static void ptslwput(queue_t *q, mblk_t *mp); +static int ptslwput(queue_t *q, mblk_t *mp); static struct module_info ptslm_info = { 0, @@ -98,7 +98,7 @@ static struct qinit ptslrinit = { }; static struct qinit ptslwinit = { - (int (*)())ptslwput, + ptslwput, NULL, NULL, NULL, @@ -384,7 +384,7 @@ ptslclose(queue_t *q, int flag, cred_t *cred) * queue up M_DATA messages for processing by the controller "read" * routine; discard everything else. */ -static void +static int ptslwput(queue_t *q, mblk_t *mp) { struct pty *pty; @@ -449,7 +449,7 @@ ptslwput(queue_t *q, mblk_t *mp) flushq(RD(q), FLUSHDATA); mutex_exit(&pty->ptc_lock); qreply(q, mp); /* give the read queues a crack at it */ - return; + return (0); } else freemsg(mp); break; @@ -466,7 +466,8 @@ ptslwput(queue_t *q, mblk_t *mp) freeb(bp); if (mp == NULL) { mutex_exit(&pty->ptc_lock); - return; /* damp squib of a message */ + /* damp squib of a message */ + return (0); } bp = mp; } @@ -499,6 +500,7 @@ ptslwput(queue_t *q, mblk_t *mp) break; } mutex_exit(&pty->ptc_lock); + return (0); } /* |