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 /netsniff-ng.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 'netsniff-ng.c')
-rw-r--r-- | netsniff-ng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c index 5477257..a2067d3 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -1400,7 +1400,7 @@ int main(int argc, char **argv) size_t alen = strlen(argv[i]) + 2; size_t flen = ctx.filter ? strlen(ctx.filter) : 0; - ctx.filter = xrealloc(ctx.filter, 1, flen + alen); + ctx.filter = xrealloc(ctx.filter, flen + alen); ret = slprintf(ctx.filter + offset, strlen(argv[i]) + 2, "%s ", argv[i]); if (ret < 0) panic("Cannot concatenate filter string!\n"); |