Skip to content

Commit

Permalink
sys: Style fix for M_EXT | M_EXTPG
Browse files Browse the repository at this point in the history
Add a space around the | operator in places testing for either M_EXT
or M_EXTPG.

Reviewed by:	imp, glebius
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D43216
  • Loading branch information
bsdjhb committed Mar 13, 2024
2 parents 55fbf8c + f7d5900 commit e665033
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions sys/kern/uipc_mbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ mb_dupcl(struct mbuf *n, struct mbuf *m)
{
volatile u_int *refcnt;

KASSERT(m->m_flags & (M_EXT|M_EXTPG),
("%s: M_EXT|M_EXTPG not set on %p", __func__, m));
KASSERT(!(n->m_flags & (M_EXT|M_EXTPG)),
("%s: M_EXT|M_EXTPG set on %p", __func__, n));
KASSERT(m->m_flags & (M_EXT | M_EXTPG),
("%s: M_EXT | M_EXTPG not set on %p", __func__, m));
KASSERT(!(n->m_flags & (M_EXT | M_EXTPG)),
("%s: M_EXT | M_EXTPG set on %p", __func__, n));

/*
* Cache access optimization.
Expand Down Expand Up @@ -575,7 +575,7 @@ m_copym(struct mbuf *m, int off0, int len, int wait)
copyhdr = 0;
}
n->m_len = min(len, m->m_len - off);
if (m->m_flags & (M_EXT|M_EXTPG)) {
if (m->m_flags & (M_EXT | M_EXTPG)) {
n->m_data = m->m_data + off;
mb_dupcl(n, m);
} else
Expand Down Expand Up @@ -617,7 +617,7 @@ m_copypacket(struct mbuf *m, int how)
if (!m_dup_pkthdr(n, m, how))
goto nospace;
n->m_len = m->m_len;
if (m->m_flags & (M_EXT|M_EXTPG)) {
if (m->m_flags & (M_EXT | M_EXTPG)) {
n->m_data = m->m_data;
mb_dupcl(n, m);
} else {
Expand All @@ -636,7 +636,7 @@ m_copypacket(struct mbuf *m, int how)
n = n->m_next;

n->m_len = m->m_len;
if (m->m_flags & (M_EXT|M_EXTPG)) {
if (m->m_flags & (M_EXT | M_EXTPG)) {
n->m_data = m->m_data;
mb_dupcl(n, m);
} else {
Expand Down Expand Up @@ -1076,7 +1076,7 @@ m_split(struct mbuf *m0, int len0, int wait)
n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif;
n->m_pkthdr.len = m0->m_pkthdr.len - len0;
m0->m_pkthdr.len = len0;
if (m->m_flags & (M_EXT|M_EXTPG))
if (m->m_flags & (M_EXT | M_EXTPG))
goto extpacket;
if (remain > MHLEN) {
/* m can't be the lead packet */
Expand All @@ -1102,7 +1102,7 @@ m_split(struct mbuf *m0, int len0, int wait)
M_ALIGN(n, remain);
}
extpacket:
if (m->m_flags & (M_EXT|M_EXTPG)) {
if (m->m_flags & (M_EXT | M_EXTPG)) {
n->m_data = m->m_data + len;
mb_dupcl(n, m);
} else {
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *plen,
}
n->m_len = mlen;
len_cp += n->m_len;
if (m->m_flags & (M_EXT|M_EXTPG)) {
if (m->m_flags & (M_EXT | M_EXTPG)) {
n->m_data = m->m_data + off;
mb_dupcl(n, m);
} else
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet/tcp_pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ tcp_pcap_add(struct tcphdr *th, struct mbuf *m, struct mbufq *queue)
* In cases where that isn't possible, settle for what we can
* get.
*/
if ((m->m_flags & (M_EXT|M_EXTPG)) &&
if ((m->m_flags & (M_EXT | M_EXTPG)) &&
tcp_pcap_take_cluster_reference()) {
n->m_data = m->m_data;
n->m_len = m->m_len;
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet/tcp_stacks/rack.c
Original file line number Diff line number Diff line change
Expand Up @@ -18455,7 +18455,7 @@ rack_fo_base_copym(struct mbuf *the_m, uint32_t the_off, int32_t *plen,
n->m_len = mlen;
soff += mlen;
len_cp += n->m_len;
if (m->m_flags & (M_EXT|M_EXTPG)) {
if (m->m_flags & (M_EXT | M_EXTPG)) {
n->m_data = m->m_data + off;
mb_dupcl(n, m);
} else {
Expand Down

0 comments on commit e665033

Please sign in to comment.