From 04108b8b2191be7ddd869c1f571030c095785a45 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 20 Jan 2017 17:43:36 +0000 Subject: [PATCH] Fix build with ICL_KERNEL_PROXY. MFC after: 2 weeks --- usr.sbin/ctld/pdu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctld/pdu.c b/usr.sbin/ctld/pdu.c index 77b9526d4200..189ab2ab1a01 100644 --- a/usr.sbin/ctld/pdu.c +++ b/usr.sbin/ctld/pdu.c @@ -106,9 +106,11 @@ pdu_new_response(struct pdu *request) static void pdu_receive_proxy(struct pdu *pdu) { + struct connection *conn; size_t len; assert(proxy_mode); + conn = pdu->pdu_connection; kernel_receive(pdu); @@ -117,7 +119,7 @@ pdu_receive_proxy(struct pdu *pdu) log_errx(1, "protocol error: non-empty AHS"); len = pdu_data_segment_length(pdu); - assert(len <= pdu->pdu_connection->conn_max_recv_data_segment_length); + assert(len <= (size_t)conn->conn_max_recv_data_segment_length); pdu->pdu_data_len = len; } @@ -185,7 +187,7 @@ pdu_receive(struct pdu *pdu) len = pdu_data_segment_length(pdu); if (len > 0) { - if ((int)len > conn->conn_max_recv_data_segment_length) { + if (len > (size_t)conn->conn_max_recv_data_segment_length) { log_errx(1, "protocol error: received PDU " "with DataSegmentLength exceeding %d", conn->conn_max_recv_data_segment_length);