瀏覽代碼

Use more standardised format specifiers in debug messages (e.g. %p for

a pointer).
tags/v0.9.3
Michael Brown 18 年之前
父節點
當前提交
82f3295794
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      src/net/udp.c

+ 2
- 2
src/net/udp.c 查看文件

@@ -48,12 +48,12 @@ static inline uint16_t * dest_port ( struct sockaddr *sock ) {
48 48
 void udp_dump ( struct udp_header *udphdr ) {
49 49
 
50 50
 	/* Print UDP header for debugging */
51
-	DBG ( "UDP header at %#x + %d\n", udphdr, sizeof ( *udphdr ) );
51
+	DBG ( "UDP header at %p + %#zx\n", udphdr, sizeof ( *udphdr ) );
52 52
 	DBG ( "\tSource Port = %d\n", ntohs ( udphdr->source_port ) );
53 53
 	DBG ( "\tDestination Port = %d\n", ntohs ( udphdr->dest_port ) );
54 54
 	DBG ( "\tLength = %d\n", ntohs ( udphdr->len ) );
55 55
 	DBG ( "\tChecksum = %x\n", ntohs ( udphdr->chksum ) );
56
-	DBG ( "\tChecksum located at %#x\n", &udphdr->chksum );
56
+	DBG ( "\tChecksum located at %p\n", &udphdr->chksum );
57 57
 }
58 58
 
59 59
 /**

Loading…
取消
儲存