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

Function ADJUST

util/folder/fts.cpp:1294–1310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1292}
1293
1294static void
1295ADJUST(FTSENT* p, void* addr)
1296{
1297 if ((p)->fts_accpath >= (p)->fts_path &&
1298 (p)->fts_accpath < (p)->fts_path + (p)->fts_pathlen) {
1299 if (p->fts_accpath != p->fts_path) {
1300 errx(1, "fts ADJUST: accpath %p path %p",
1301 p->fts_accpath, p->fts_path);
1302 }
1303 if (p->fts_level != 0) {
1304 errx(1, "fts ADJUST: level %d not 0", p->fts_level);
1305 }
1306 (p)->fts_accpath =
1307 (char*)addr + ((p)->fts_accpath - (p)->fts_path);
1308 }
1309 (p)->fts_path = (char*)addr;
1310}
1311
1312/*
1313 * When the path is realloc'd, have to fix all of the pointers in structures

Callers 1

fts_padjustFunction · 0.85

Calls 1

errxFunction · 0.85

Tested by

no test coverage detected