summaryrefslogtreecommitdiff
path: root/ring.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.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.c')
-rw-r--r--ring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ring.c b/ring.c
index b5c626c..00f54e5 100644
--- a/ring.c
+++ b/ring.c
@@ -23,7 +23,7 @@
void setup_ring_layout_generic(struct ring *ring, size_t size,
bool jumbo_support)
{
- fmemset(&ring->layout, 0, sizeof(ring->layout));
+ memset(&ring->layout, 0, sizeof(ring->layout));
ring->layout.tp_block_size = (jumbo_support ?
RUNTIME_PAGE_SIZE << 4 :
@@ -65,7 +65,7 @@ void bind_ring_generic(int sock, struct ring *ring, int ifindex, bool tx_only)
* dev_add_pack(), so we have one single RX_RING for all devs
* otherwise you'll get the packet twice.
*/
- fmemset(&ring->s_ll, 0, sizeof(ring->s_ll));
+ memset(&ring->s_ll, 0, sizeof(ring->s_ll));
ring->s_ll.sll_family = AF_PACKET;
ring->s_ll.sll_ifindex = ifindex;