mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 15:25:07 +00:00
AK: Remove custom %b format string specifier
This was a non-standard specifier alias for %02x. This patch replaces all uses of it with new-style formatting functions instead.
This commit is contained in:
parent
89d3b09638
commit
cb2c8f71f4
12 changed files with 27 additions and 28 deletions
|
@ -128,7 +128,7 @@ void NetworkTask_main(void*)
|
|||
|
||||
#ifdef ETHERNET_VERY_DEBUG
|
||||
for (size_t i = 0; i < packet_size; i++) {
|
||||
klog() << String::format("%b", buffer[i]);
|
||||
klog() << String::format("%#02x", buffer[i]);
|
||||
|
||||
switch (i % 16) {
|
||||
case 7:
|
||||
|
@ -249,7 +249,7 @@ void handle_icmp(const EthernetFrameHeader& eth, const IPv4Packet& ipv4_packet,
|
|||
{
|
||||
auto& icmp_header = *static_cast<const ICMPHeader*>(ipv4_packet.payload());
|
||||
#ifdef ICMP_DEBUG
|
||||
klog() << "handle_icmp: source=" << ipv4_packet.source().to_string().characters() << ", destination=" << ipv4_packet.destination().to_string().characters() << ", type=" << String::format("%b", icmp_header.type()) << ", code=" << String::format("%b", icmp_header.code());
|
||||
dbgln("handle_icmp: source={}, destination={}, type={:#02x}, code={:#02x}", ipv4_packet.source().to_string(), ipv4_packet.destination().to_string(), icmp_header.type(), icmp_header.code());
|
||||
#endif
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue