summaryrefslogtreecommitdiff
path: root/netsniff-ng.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2018-03-06 18:44:11 +0100
committerTobias Klauser <tklauser@distanz.ch>2018-03-06 18:44:11 +0100
commit2af099cae27fef1a57aa25d48fc915d619ea216d (patch)
treeff661aad6ab62c6db94b68a3eacba930ffb87881 /netsniff-ng.c
parent18f5d4dde7ef18efa0489f2007f5ebeed89975ea (diff)
all: drop fmem{cpy,set}
There is no need to explicity use the builtins. According to [1], GCC will recognize mem{cpy,set} as built-in functions, unless the corresponding -fno-builtin-* option is specified (which is not the case for netsniff-ng). [1] https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r--netsniff-ng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 2c41a33..cbd837b 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -515,7 +515,7 @@ static void receive_to_xmit(struct ctx *ctx)
}
tpacket_hdr_clone(&hdr_out->tp_h, &hdr_in->tp_h);
- fmemcpy(out, in, hdr_in->tp_h.tp_len);
+ memcpy(out, in, hdr_in->tp_h.tp_len);
kernel_may_pull_from_tx(&hdr_out->tp_h);
if (ctx->randomize)
@@ -660,7 +660,7 @@ static void read_pcap(struct ctx *ctx)
panic("Error prepare reading pcap!\n");
}
- fmemset(&fm, 0, sizeof(fm));
+ memset(&fm, 0, sizeof(fm));
bpf_parse_rules(ctx->filter, &bpf_ops, ctx->link_type);
if (ctx->dump_bpf)
@@ -786,7 +786,7 @@ static void finish_multi_pcap_file(struct ctx *ctx, int fd)
close(fd);
- fmemset(&itimer, 0, sizeof(itimer));
+ memset(&itimer, 0, sizeof(itimer));
setitimer(ITIMER_REAL, &itimer, NULL);
}