]> The Tcpdump Group git mirrors - tcpdump/commitdiff
0x%02d is silly - 0x means "hex", so it should be 0x%02x.
authorGuy Harris <[email protected]>
Fri, 8 Jun 2012 17:14:14 +0000 (10:14 -0700)
committerGuy Harris <[email protected]>
Fri, 8 Jun 2012 17:14:14 +0000 (10:14 -0700)
Found by Xavier Heiny.

print-rrcp.c

index 64cb7dec312de8af4f9ff0c82efad6e004f0d806..c5b1fdd96a20fb1a0dd731760f6de2986867be74 100644 (file)
@@ -102,11 +102,11 @@ rrcp_print(netdissect_options *ndo,
         ND_PRINT((ndo, "%s > %s, %s %s",
                etheraddr_string(ESRC(ep)),
                etheraddr_string(EDST(ep)),
-               tok2strbuf(proto_values,"RRCP-0x%02d",rrcp_proto,proto_str,sizeof(proto_str)),
+               tok2strbuf(proto_values,"RRCP-0x%02x",rrcp_proto,proto_str,sizeof(proto_str)),
                ((*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY) ? "reply" : "query"));
        if (rrcp_proto==1){
            ND_PRINT((ndo, ": %s",
-                    tok2strbuf(opcode_values,"unknown opcode (0x%02d)",rrcp_opcode,opcode_str,sizeof(opcode_str))));
+                    tok2strbuf(opcode_values,"unknown opcode (0x%02x)",rrcp_opcode,opcode_str,sizeof(opcode_str))));
        }
        if (rrcp_opcode==1 || rrcp_opcode==2){
            ND_TCHECK2(*(rrcp + RRCP_REG_ADDR_OFFSET), 6);