Browse Source

test: Fix some warnings in inet

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 12 years ago
parent
commit
0f9734f891
2 changed files with 2 additions and 2 deletions
  1. 1 1
      test/inet/gethostid.c
  2. 1 1
      test/inet/getnetent.c

+ 1 - 1
test/inet/gethostid.c

@@ -1,6 +1,6 @@
 #include <unistd.h>
 #include <stdio.h>
 int main(void) {
-	printf("hostid=%d\n", gethostid());
+	printf("hostid=%ld\n", gethostid());
 	return 0;
 }

+ 1 - 1
test/inet/getnetent.c

@@ -8,7 +8,7 @@ int main(void)
 		while (net->n_net && !((net->n_net >> 24) & 0xff)) {
 			net->n_net <<= 8;
 		}
-		printf("%lu.%lu.%lu.%lu\n",
+		printf("%u.%u.%u.%u\n",
 			   (net->n_net >> 24) & 0xff, (net->n_net >> 16) & 0xff,
 			   (net->n_net >> 8) & 0xff, net->n_net & 0xff);
 	}