]> granicus.if.org Git - check/commitdiff
Change type from signed int to size_t
authorMikko Koivunalho <mikko.koivunalho@iki.fi>
Fri, 31 May 2019 14:52:15 +0000 (17:52 +0300)
committerMikko Koivunalho <mikko.koivunalho@iki.fi>
Fri, 31 May 2019 15:09:33 +0000 (18:09 +0300)
check_pack.c:327:10: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
       if(n > get_max_msg_size())
        ^

Signed-off-by: Mikko Koivunalho <mikko.koivunalho@iki.fi>
src/check_pack.c

index 0fe1774c398ba3af8ed87214d8eb32a06f1cc6e6..d815d784363c93634d97589f354e7ec08583cf57 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include <stddef.h>
 
 #include "check.h"
 #include "check_error.h"
@@ -319,8 +320,7 @@ static void ppack_cleanup(void *mutex)
 void ppack(FILE * fdes, enum ck_msg_type type, CheckMsg * msg)
 {
     char *buf = NULL;
-    int n;
-    ssize_t r;
+    size_t n, r;
 
     n = pack(type, &buf, msg);
     /* Keep it on the safe side to not send too much data. */