summaryrefslogtreecommitdiff
path: root/lib/mgmt_msg.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-03-20 19:28:42 -0400
committerChristian Hopps <chopps@gmail.com>2023-03-22 05:22:56 +0000
commit0b645fd2168d977878b1cf0d14eff3755ca66e05 (patch)
tree18b64f967378efb5ce65016cebb4931003e9552e /lib/mgmt_msg.c
parentd6c755f245eeb2aedfd2b84aafee4103fb0417db (diff)
lib: mgmtd: fix build warnings (as error)dev/mgmtd
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/mgmt_msg.c')
-rw-r--r--lib/mgmt_msg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mgmt_msg.c b/lib/mgmt_msg.c
index d212fef92c..2fab03bc54 100644
--- a/lib/mgmt_msg.c
+++ b/lib/mgmt_msg.c
@@ -56,7 +56,7 @@ enum mgmt_msg_rsched mgmt_msg_read(struct mgmt_msg_state *ms, int fd,
*/
while (avail > sizeof(struct mgmt_msg_hdr)) {
n = stream_read_try(ms->ins, fd, avail);
- MGMT_MSG_DBG(dbgtag, "got %ld bytes", n);
+ MGMT_MSG_DBG(dbgtag, "got %zd bytes", n);
/* -2 is normal nothing read, and to retry */
if (n == -2)
@@ -85,7 +85,7 @@ enum mgmt_msg_rsched mgmt_msg_read(struct mgmt_msg_state *ms, int fd,
MGMT_MSG_DBG(dbgtag, "recv corrupt buffer, disconnect");
return MSR_DISCONNECT;
}
- if (mhdr->len > left)
+ if ((ssize_t)mhdr->len > left)
break;
MGMT_MSG_DBG(dbgtag, "read full message len %u", mhdr->len);