iron out all extra compiler warnings
[project/libnl-tiny.git] / nl.c
diff --git a/nl.c b/nl.c
index 2fb866eca903910738e666e6b235a52552ce8736..2649470f542f88e090f207489100a065a95e0a1e 100644 (file)
--- a/nl.c
+++ b/nl.c
@@ -425,7 +425,7 @@ retry:
                }
        }
 
-       if (iov.iov_len < n ||
+       if (iov.iov_len < (size_t) n ||
            msg.msg_flags & MSG_TRUNC) {
                /* Provided buffer is not long enough, enlarge it
                 * and try again. */
@@ -599,7 +599,7 @@ continue_reading:
                else if (hdr->nlmsg_type == NLMSG_ERROR) {
                        struct nlmsgerr *e = nlmsg_data(hdr);
 
-                       if (hdr->nlmsg_len < nlmsg_msg_size(sizeof(*e))) {
+                       if (hdr->nlmsg_len < (unsigned) nlmsg_msg_size(sizeof(*e))) {
                                /* Truncated error message, the default action
                                 * is to stop parsing. The user may overrule
                                 * this action by returning NL_SKIP or