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

Function UTIL_createFNT_fromROTable

freebsd/contrib/zstd/programs/util.c:1011–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1009}
1010
1011FileNamesTable* UTIL_createFNT_fromROTable(const char** filenames, size_t nbFilenames)
1012{
1013 size_t const sizeof_FNTable = nbFilenames * sizeof(*filenames);
1014 const char** const newFNTable = (const char**)malloc(sizeof_FNTable);
1015 if (newFNTable==NULL) return NULL;
1016 memcpy((void*)newFNTable, filenames, sizeof_FNTable); /* void* : mitigate a Visual compiler bug or limitation */
1017 return UTIL_assembleFileNamesTable(newFNTable, nbFilenames, NULL);
1018}
1019
1020
1021/*-****************************************

Callers

nothing calls this directly

Calls 3

mallocFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected