From 1121a936c2ed08001d9627ae98fb03445c7ddf38 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 6 Jun 2012 15:19:18 +0200 Subject: [PATCH] SAP: Use proper type instead of *void for disconnect_ind param Use struct sap_connection as parameter type for clarity. --- sap/server.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sap/server.c b/sap/server.c index c385baa24..bc466d07c 100644 --- a/sap/server.c +++ b/sap/server.c @@ -264,9 +264,8 @@ static int send_message(struct sap_connection *conn, void *buf, size_t size) return written; } -static int disconnect_ind(void *sap_device, uint8_t disc_type) +static int disconnect_ind(struct sap_connection *conn, uint8_t disc_type) { - struct sap_connection *conn = sap_device; char buf[SAP_BUF_SIZE]; struct sap_message *msg = (struct sap_message *) buf; struct sap_parameter *param = (struct sap_parameter *) msg->param; @@ -284,7 +283,7 @@ static int disconnect_ind(void *sap_device, uint8_t disc_type) *param->val = disc_type; size += PARAMETER_SIZE(SAP_PARAM_ID_DISCONNECT_IND_LEN); - return send_message(sap_device, buf, size); + return send_message(conn, buf, size); } static void connect_req(struct sap_connection *conn, -- 2.47.3