diff options
author | Duncan Roe <duncan_roe@optusnet.com.au> | 2019-12-31 22:03:07 +1100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2020-01-03 13:23:08 +0100 |
commit | c5bcd787a6a5e4c73d125ed5585bdc145e2a1958 (patch) | |
tree | 38e17d27b635907b06da62f08de82d06e8a36100 /src/extra/pktbuff.c | |
parent | 312e360b903b010a73a564068540f5917ba8134b (diff) |
src: Always use pktb as formal arg of type struct pkt_buff
All remaining instances of pkt refer to something other than a pkt_buff.
In the prototype for nfq_nlmsg_parse, pkt is changed to attr.
Inconsistent whitespace in headers has been left for another day.
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/extra/pktbuff.c')
-rw-r--r-- | src/extra/pktbuff.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/extra/pktbuff.c b/src/extra/pktbuff.c index 6250fbf..37f6bc0 100644 --- a/src/extra/pktbuff.c +++ b/src/extra/pktbuff.c @@ -271,26 +271,26 @@ uint8_t *pktb_transport_header(struct pkt_buff *pktb) * @} */ -static int pktb_expand_tail(struct pkt_buff *pkt, int extra) +static int pktb_expand_tail(struct pkt_buff *pktb, int extra) { /* No room in packet, cannot mangle it. We don't support dynamic * reallocation. Instead, increase the size of the extra room in * the tail in pktb_alloc. */ - if (pkt->len + extra > pkt->data_len) + if (pktb->len + extra > pktb->data_len) return 0; - pkt->len += extra; - pkt->tail = pkt->tail + extra; + pktb->len += extra; + pktb->tail = pktb->tail + extra; return 1; } -static int enlarge_pkt(struct pkt_buff *pkt, unsigned int extra) +static int enlarge_pkt(struct pkt_buff *pktb, unsigned int extra) { - if (pkt->len + extra > 65535) + if (pktb->len + extra > 65535) return 0; - if (!pktb_expand_tail(pkt, extra - pktb_tailroom(pkt))) + if (!pktb_expand_tail(pktb, extra - pktb_tailroom(pktb))) return 0; return 1; |