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

Function bchange

strings/bchange.c:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "m_string.h"
29
30void bchange(register uchar *dst, size_t old_length, register const uchar *src,
31 size_t new_length, size_t tot_length)
32{
33 size_t rest=tot_length-old_length;
34 if (old_length < new_length)
35 bmove_upp(dst+rest+new_length,dst+tot_length,rest);
36 else
37 bmove(dst+new_length,dst+old_length,rest);
38 memcpy(dst,src,new_length);
39}

Callers 2

pack_dirnameFunction · 0.85
my_pathFunction · 0.85

Calls 1

bmove_uppFunction · 0.85

Tested by

no test coverage detected