소스 검색

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…
취소
저장