zebra/rtread_getmsg: fix sign warnings
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/zebra/rtread_getmsg.c b/zebra/rtread_getmsg.c
index 7fb916f..5057358 100644
--- a/zebra/rtread_getmsg.c
+++ b/zebra/rtread_getmsg.c
@@ -156,13 +156,13 @@
/* This is normal loop termination */
if (retval == 0 &&
- msgdata.len >= sizeof (struct T_optmgmt_ack) &&
+ (size_t)msgdata.len >= sizeof (struct T_optmgmt_ack) &&
TLIack->PRIM_type == T_OPTMGMT_ACK &&
TLIack->MGMT_flags == T_SUCCESS &&
MIB2hdr->len == 0)
break;
- if (msgdata.len >= sizeof (struct T_error_ack) &&
+ if ((size_t)msgdata.len >= sizeof (struct T_error_ack) &&
TLIerr->PRIM_type == T_ERROR_ACK) {
zlog_warn ("getmsg(ctl) returned T_ERROR_ACK: %s",
safe_strerror ((TLIerr->TLI_error == TSYSERR)
@@ -174,7 +174,7 @@
like what GateD does in this instance, but not
critical yet. */
if (retval != MOREDATA ||
- msgdata.len < sizeof (struct T_optmgmt_ack) ||
+ (size_t)msgdata.len < sizeof (struct T_optmgmt_ack) ||
TLIack->PRIM_type != T_OPTMGMT_ACK ||
TLIack->MGMT_flags != T_SUCCESS) {
errno = ENOMSG;