MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / copy_terminate

Function copy_terminate

src/common/utils.cpp:93–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93char* copy_terminate(char* dest, const char* src, size_t bufsize)
94{
95/**************************************
96 *
97 * c o p y _ t e r m i n a t e
98 *
99 **************************************
100 *
101 * Functional description
102 * Do the same as strncpy but ensure the null terminator is written.
103 *
104 **************************************/
105 if (!bufsize) // Was it a joke?
106 return dest;
107
108 --bufsize;
109 strncpy(dest, src, bufsize);
110 dest[bufsize] = 0;
111 return dest;
112}
113
114
115char* exact_name(char* const name)

Callers 15

DSC_get_dtype_nameFunction · 0.70
ISC_get_hostFunction · 0.70
expand_share_nameFunction · 0.70
itemMethod · 0.50
reconnectMethod · 0.50
connect_clientMethod · 0.50
server_initMethod · 0.50
gbakFunction · 0.50
authenticateMethod · 0.50
yylexAuxMethod · 0.50
CLIB_ROUTINE mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected