MCPcopy Create free account
hub / github.com/coreboot/coreboot / strncpy

Function strncpy

src/lib/string.c:58–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58char *strncpy(char *to, const char *from, size_t count)
59{
60 char *ret = to;
61 char data;
62
63 while (count > 0) {
64 count--;
65 data = *from++;
66 *to++ = data;
67 if (data == '\0')
68 break;
69 }
70
71 while (count > 0) {
72 count--;
73 *to++ = '\0';
74 }
75 return ret;
76}
77
78char *strcpy(char *dst, const char *src)
79{

Callers 15

mptable_initFunction · 0.50
set_dimm_infoFunction · 0.50
copy_meminfoFunction · 0.50
update_board_layoutFunction · 0.50
tpm_cb_log_copy_entriesFunction · 0.50
tpm2_log_add_table_entryFunction · 0.50
tpm1_log_add_table_entryFunction · 0.50
acpi_iort_nc_entryFunction · 0.50
acpi_create_dbg2Function · 0.50
set_valueFunction · 0.50

Calls

no outgoing calls

Tested by 2

mptable_initFunction · 0.40
test_strncpyFunction · 0.40