When setting fragment queue pointers to NULL, or comparing them with
NULL, use NULL rather than 0 to improve readability.
This commit is contained in:
parent
ba40a03417
commit
042bbfa3b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115909
@ -753,7 +753,7 @@ ip_input(struct mbuf *m)
|
||||
ip->ip_p == fp->ipq_p)
|
||||
goto found;
|
||||
|
||||
fp = 0;
|
||||
fp = NULL;
|
||||
|
||||
/*
|
||||
* Enforce upper bound on number of fragmented packets
|
||||
@ -977,7 +977,7 @@ ip_reass(struct mbuf *m, struct ipqhead *head, struct ipq *fp,
|
||||
/*
|
||||
* If first fragment to arrive, create a reassembly queue.
|
||||
*/
|
||||
if (fp == 0) {
|
||||
if (fp == NULL) {
|
||||
if ((t = m_get(M_DONTWAIT, MT_FTABLE)) == NULL)
|
||||
goto dropfrag;
|
||||
fp = mtod(t, struct ipq *);
|
||||
@ -1177,7 +1177,7 @@ ip_reass(struct mbuf *m, struct ipqhead *head, struct ipq *fp,
|
||||
*divert_rule = 0;
|
||||
#endif
|
||||
ipstat.ips_fragdropped++;
|
||||
if (fp != 0)
|
||||
if (fp != NULL)
|
||||
fp->ipq_nfrags--;
|
||||
m_freem(m);
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user