show_default_sockopts: avoid signed/unsigned warn
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Sun, 14 Aug 2011 06:22:17 +0000 (23:22 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Sun, 14 Aug 2011 06:22:17 +0000 (23:22 -0700)
Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>

show_default_sockopts.c

index cc5f0d4..31e2916 100644 (file)
@@ -21,7 +21,8 @@ struct option_t {
 
 void option_query(int s, int type, struct option_t *p)
 {
-       int value, vlen = 4;
+       int value;
+       socklen_t vlen = 4;
 
        for (; p->descr != NULL; ++p) {
                if (getsockopt(s, type, p->opt, (void *)&value, &vlen) == -1) {