summaryrefslogtreecommitdiff
path: root/bpf.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-02-05 12:14:32 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-02-05 12:14:32 +0100
commitdb20fa00ca9880e6e661befee92e19194fa5e69a (patch)
tree2f1832d48357c53e9285f870478cadaff663b4f4 /bpf.c
parent42e233eab7e6f5eb1a63545c526aa7dd34945bef (diff)
xmalloc: Make xrealloc() arguments conform to realloc()
xrealloc() has an additional nmemb argument compared to realloc() for which it should serve as a wrapper. Since we always call with nmemb = 1, we might as well remove this argument and thus have xrealloc() conform to the realloc() function prototype. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'bpf.c')
-rw-r--r--bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bpf.c b/bpf.c
index 6239af9..25cf25d 100644
--- a/bpf.c
+++ b/bpf.c
@@ -755,7 +755,7 @@ void bpf_parse_rules(char *rulefile, struct sock_fprog *bpf, uint32_t link_type)
panic("BPF syntax error!\n");
bpf->len++;
- bpf->filter = xrealloc(bpf->filter, 1,
+ bpf->filter = xrealloc(bpf->filter,
bpf->len * sizeof(sf_single));
fmemcpy(&bpf->filter[bpf->len - 1], &sf_single,