clang-format: Set IndentCaseBlocks to false

This commit is contained in:
Tim Wojtulewicz 2021-09-24 15:40:37 -07:00
parent 02206f3215
commit 4423574d26
58 changed files with 4729 additions and 4766 deletions

View file

@ -274,36 +274,36 @@ TransportProto ICMPAnalyzer::GetContextProtocol(const IP_Hdr* ip_hdr, uint32_t*
switch ( proto )
{
case TRANSPORT_ICMP:
{
const struct icmp* icmpp = (const struct icmp*)transport_hdr;
bool is_one_way; // dummy
*src_port = ntohs(icmpp->icmp_type);
{
const struct icmp* icmpp = (const struct icmp*)transport_hdr;
bool is_one_way; // dummy
*src_port = ntohs(icmpp->icmp_type);
if ( ip4 )
*dst_port =
ntohs(ICMP4_counterpart(icmpp->icmp_type, icmpp->icmp_code, is_one_way));
else
*dst_port =
ntohs(ICMP6_counterpart(icmpp->icmp_type, icmpp->icmp_code, is_one_way));
if ( ip4 )
*dst_port =
ntohs(ICMP4_counterpart(icmpp->icmp_type, icmpp->icmp_code, is_one_way));
else
*dst_port =
ntohs(ICMP6_counterpart(icmpp->icmp_type, icmpp->icmp_code, is_one_way));
break;
}
break;
}
case TRANSPORT_TCP:
{
const struct tcphdr* tp = (const struct tcphdr*)transport_hdr;
*src_port = ntohs(tp->th_sport);
*dst_port = ntohs(tp->th_dport);
break;
}
{
const struct tcphdr* tp = (const struct tcphdr*)transport_hdr;
*src_port = ntohs(tp->th_sport);
*dst_port = ntohs(tp->th_dport);
break;
}
case TRANSPORT_UDP:
{
const struct udphdr* up = (const struct udphdr*)transport_hdr;
*src_port = ntohs(up->uh_sport);
*dst_port = ntohs(up->uh_dport);
break;
}
{
const struct udphdr* up = (const struct udphdr*)transport_hdr;
*src_port = ntohs(up->uh_sport);
*dst_port = ntohs(up->uh_dport);
break;
}
default:
*src_port = *dst_port = ntohs(0);
@ -749,10 +749,10 @@ zeek::VectorValPtr ICMPAnalyzer::BuildNDOptionsVal(int caplen, const u_char* dat
}
default:
{
set_payload_field = true;
break;
}
{
set_payload_field = true;
break;
}
}
if ( set_payload_field )