瀏覽代碼

test: Fix some warnings in inet

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 13 年之前
父節點
當前提交
0f9734f891
共有 2 個文件被更改,包括 2 次插入2 次删除
  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);
 	}