From 4301b2519d29ce5dec4133450299df07f87c6455 Mon Sep 17 00:00:00 2001 From: Maksim Yevmenkin Date: Wed, 28 Mar 2007 21:25:56 +0000 Subject: [PATCH] Try to silence Coverity by adding (void) in front of function call. Also add a comment, explaining why return value is not being checked. Requested by: netchild MFC after: 1 week --- sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c index 2e0efe392ef..60bfd457c85 100644 --- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c +++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c @@ -90,7 +90,17 @@ ng_l2cap_con_wakeup(ng_l2cap_con_p con) case NG_L2CAP_DISCON_RSP: case NG_L2CAP_ECHO_RSP: case NG_L2CAP_INFO_RSP: - ng_l2cap_lp_send(con, NG_L2CAP_SIGNAL_CID, m); + /* + * Do not check return ng_l2cap_lp_send() value, because + * in these cases we do not really have a graceful way out. + * ECHO and INFO responses are internal to the stack and not + * visible to user. REJect is just being nice to remote end + * (otherwise remote end will timeout anyway). DISCON is + * probably most interesting here, however, if it fails + * there is nothing we can do anyway. + */ + + (void) ng_l2cap_lp_send(con, NG_L2CAP_SIGNAL_CID, m); ng_l2cap_unlink_cmd(cmd); ng_l2cap_free_cmd(cmd); break;