summaryrefslogtreecommitdiff
path: root/pcap_mm.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 /pcap_mm.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 'pcap_mm.c')
-rw-r--r--pcap_mm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pcap_mm.c b/pcap_mm.c
index f7b248e..75ee0af 100644
--- a/pcap_mm.c
+++ b/pcap_mm.c
@@ -56,9 +56,9 @@ static ssize_t pcap_mm_write(int fd, pcap_pkthdr_t *phdr, enum pcap_type type,
if ((off_t) (ptr_va_curr - ptr_va_start) + hdrsize + len > map_size)
__pcap_mmap_write_need_remap(fd);
- fmemcpy(ptr_va_curr, &phdr->raw, hdrsize);
+ memcpy(ptr_va_curr, &phdr->raw, hdrsize);
ptr_va_curr += hdrsize;
- fmemcpy(ptr_va_curr, packet, len);
+ memcpy(ptr_va_curr, packet, len);
ptr_va_curr += len;
return hdrsize + len;
@@ -72,7 +72,7 @@ static ssize_t pcap_mm_read(int fd __maybe_unused, pcap_pkthdr_t *phdr,
if (unlikely((off_t) (ptr_va_curr + hdrsize - ptr_va_start) > (off_t) map_size))
return -EIO;
- fmemcpy(&phdr->raw, ptr_va_curr, hdrsize);
+ memcpy(&phdr->raw, ptr_va_curr, hdrsize);
ptr_va_curr += hdrsize;
hdrlen = pcap_get_length(phdr, type);
@@ -81,7 +81,7 @@ static ssize_t pcap_mm_read(int fd __maybe_unused, pcap_pkthdr_t *phdr,
if (unlikely(hdrlen == 0 || hdrlen > len))
return -EINVAL;
- fmemcpy(packet, ptr_va_curr, hdrlen);
+ memcpy(packet, ptr_va_curr, hdrlen);
ptr_va_curr += hdrlen;
return hdrsize + hdrlen;