MCPcopy Create free account
hub / github.com/catboost/catboost / fts_padjust

Function fts_padjust

util/folder/fts.cpp:1316–1338  ·  view source on GitHub ↗

* When the path is realloc'd, have to fix all of the pointers in structures * already returned. */

Source from the content-addressed store, hash-verified

1314 * already returned.
1315 */
1316static void
1317fts_padjust(FTS* sp)
1318{
1319 FTSENT* p;
1320 char* addr = sp->fts_path;
1321
1322#define ADJUST1(p) \
1323 { \
1324 if ((p)->fts_accpath == (p)->fts_path) \
1325 (p)->fts_accpath = (addr); \
1326 (p)->fts_path = addr; \
1327 }
1328 /* Adjust the current set of children. */
1329 for (p = sp->fts_child; p; p = p->fts_link) {
1330 ADJUST(p, addr);
1331 }
1332
1333 /* Adjust the rest of the tree. */
1334 for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
1335 ADJUST(p, addr);
1336 p = p->fts_link ? p->fts_link : p->fts_parent;
1337 }
1338}
1339
1340static size_t
1341fts_maxarglen(char* const* argv)

Callers 1

fts.cppFile · 0.85

Calls 1

ADJUSTFunction · 0.85

Tested by

no test coverage detected