Browse Source

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

a pointer).
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
82f3295794
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/net/udp.c

+ 2
- 2
src/net/udp.c View File

48
 void udp_dump ( struct udp_header *udphdr ) {
48
 void udp_dump ( struct udp_header *udphdr ) {
49
 
49
 
50
 	/* Print UDP header for debugging */
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
 	DBG ( "\tSource Port = %d\n", ntohs ( udphdr->source_port ) );
52
 	DBG ( "\tSource Port = %d\n", ntohs ( udphdr->source_port ) );
53
 	DBG ( "\tDestination Port = %d\n", ntohs ( udphdr->dest_port ) );
53
 	DBG ( "\tDestination Port = %d\n", ntohs ( udphdr->dest_port ) );
54
 	DBG ( "\tLength = %d\n", ntohs ( udphdr->len ) );
54
 	DBG ( "\tLength = %d\n", ntohs ( udphdr->len ) );
55
 	DBG ( "\tChecksum = %x\n", ntohs ( udphdr->chksum ) );
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…
Cancel
Save