summaryrefslogtreecommitdiff
path: root/ring_tx.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 /ring_tx.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 'ring_tx.c')
-rw-r--r--ring_tx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ring_tx.c b/ring_tx.c
index 4041bc4..d7f602b 100644
--- a/ring_tx.c
+++ b/ring_tx.c
@@ -37,7 +37,7 @@ void destroy_tx_ring(int sock, struct ring *ring)
munmap(ring->mm_space, ring->mm_len);
ring->mm_len = 0;
- fmemset(&ring->layout, 0, sizeof(ring->layout));
+ memset(&ring->layout, 0, sizeof(ring->layout));
ret = setsockopt(sock, SOL_PACKET, PACKET_TX_RING, &ring->layout,
sizeof(ring->layout));
if (unlikely(ret))
@@ -89,7 +89,7 @@ static void alloc_tx_ring_frames(int sock __maybe_unused, struct ring *ring)
void ring_tx_setup(struct ring *ring, int sock, size_t size, int ifindex,
bool jumbo_support, bool verbose)
{
- fmemset(ring, 0, sizeof(*ring));
+ memset(ring, 0, sizeof(*ring));
set_packet_loss_discard(sock);
setup_tx_ring_layout(sock, ring, size, jumbo_support);
create_tx_ring(sock, ring, verbose);