MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / intern_filename

Function intern_filename

mysys/mf_pack.c:457–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455 /* Fix a filename to intern (UNIX format) */
456
457char *intern_filename(char *to, const char *from)
458{
459 size_t length, to_length;
460 char buff[FN_REFLEN];
461 if (from == to)
462 { /* Dirname may destroy from */
463 (void) strnmov(buff, from, FN_REFLEN);
464 from=buff;
465 }
466 length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */
467 (void) strnmov(to + to_length, from + length, FN_REFLEN - to_length);
468 return (to);
469} /* intern_filename */

Callers 4

pack_dirnameFunction · 0.85
normalize_dirnameFunction · 0.85
my_pathFunction · 0.85
my_initFunction · 0.85

Calls 2

strnmovFunction · 0.85
dirname_partFunction · 0.85

Tested by

no test coverage detected