MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / safe_strcpy

Function safe_strcpy

components/net/utest/tc_sal_socket.c:80–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static void safe_strcpy(char *dest, const char *src, size_t dest_size)
81{
82 if (dest_size > 0)
83 {
84 strncpy(dest, src, dest_size - 1);
85 dest[dest_size - 1] = '\0';
86 }
87 LOG_D("Copied string '%s' to destination with size %u", src, dest_size);
88}
89
90static void check_network_status(void)
91{

Callers 1

check_network_statusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected