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

Function FIO_createContext

freebsd/contrib/zstd/programs/fileio.c:385–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385FIO_ctx_t* FIO_createContext(void)
386{
387 FIO_ctx_t* const ret = (FIO_ctx_t*)malloc(sizeof(FIO_ctx_t));
388 if (!ret) EXM_THROW(21, "Allocation error : not enough memory");
389
390 ret->currFileIdx = 0;
391 ret->hasStdinInput = 0;
392 ret->hasStdoutOutput = 0;
393 ret->nbFilesTotal = 1;
394 ret->nbFilesProcessed = 0;
395 ret->totalBytesInput = 0;
396 ret->totalBytesOutput = 0;
397 return ret;
398}
399
400void FIO_freePreferences(FIO_prefs_t* const prefs)
401{

Callers 1

mainFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected