MCPcopy Create free account
hub / github.com/F-Stack/f-stack / strncat

Function strncat

freebsd/libkern/strncat.c:45–63  ·  view source on GitHub ↗

* Concatenate src on the end of dst. At most strlen(dst)+n+1 bytes * are written at dst (at most n+1 bytes being appended). Return dst. */

Source from the content-addressed store, hash-verified

43 * are written at dst (at most n+1 bytes being appended). Return dst.
44 */
45char *
46strncat(char *dst, const char *src, size_t n)
47{
48
49 if (n != 0) {
50 char *d = dst;
51 const char *s = src;
52
53 while (*d != 0)
54 d++;
55 do {
56 if ((*d = *s++) == '\0')
57 break;
58 d++;
59 } while (--n != 0);
60 *d = '\0';
61 }
62 return (dst);
63}

Callers 6

AcpiUtSafeStrncatFunction · 0.85
process_file_argsFunction · 0.85
luaO_chunkidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected