diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-02-05 12:14:32 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-02-05 12:14:32 +0100 |
commit | db20fa00ca9880e6e661befee92e19194fa5e69a (patch) | |
tree | 2f1832d48357c53e9285f870478cadaff663b4f4 /bpf_comp.c | |
parent | 42e233eab7e6f5eb1a63545c526aa7dd34945bef (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_comp.c')
-rw-r--r-- | bpf_comp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -24,7 +24,7 @@ void bpf_try_compile(const char *rulefile, struct sock_fprog *bpf, uint32_t link panic("Cannot compile filter %s\n", rulefile); bpf->len = _bpf.bf_len; - bpf->filter = xrealloc(bpf->filter, 1, bpf->len * sizeof(*out)); + bpf->filter = xrealloc(bpf->filter, bpf->len * sizeof(*out)); for (i = 0, ins = _bpf.bf_insns, out = bpf->filter; i < bpf->len; ++i, ++ins, ++out) { |