MCPcopy Create free account
hub / github.com/coreutils/coreutils / copy_bytes

Function copy_bytes

src/cut.c:417–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415/* Like memcpy, but avoid a function call for smaller amounts. */
416
417static inline void
418copy_bytes (char *dst, char const *src, size_t n_bytes)
419{
420 if (n_bytes <= SMALL_BYTE_THRESHOLD)
421 {
422 for (size_t i = 0; i < n_bytes; i++)
423 dst[i] = src[i];
424 return;
425 }
426
427 memcpy (dst, src, n_bytes);
428}
429
430/* Like memchr, but avoid a function call for smaller amounts. */
431

Callers 2

append_field_1_chunkFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected