1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-29 11:21:22 +03:00

switched UTIL_refFilename() to an assert()

This commit is contained in:
Yann Collet
2019-11-26 14:48:23 -08:00
parent 46bdbb9c06
commit f622c0adf3
2 changed files with 5 additions and 6 deletions

View File

@ -221,11 +221,10 @@ FileNamesTable* UTIL_allocateFileNamesTable(size_t tableSize);
/*! UTIL_refFilename() :
* Add a read-only name to reference into @fnt table.
* Since @filename is only referenced, its lifetime must outlive @fnt.
* This function never fails, but it can abort().
* Internal table must be large enough to reference a new member
* (capacity > size), otherwise the function will abort().
* Add a reference to read-only name into @fnt table.
* As @filename is only referenced, its lifetime must outlive @fnt.
* Internal table must be large enough to reference a new member,
* otherwise its UB (protected by an `assert()`).
*/
void UTIL_refFilename(FileNamesTable* fnt, const char* filename);