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

Function safe_strncpy

src/yvalve/gds.cpp:1041–1050  ·  view source on GitHub ↗

s a f e _ s t r n c p y Done exclusively because in legacy mode, safe_interpret cannot fill the string up to the end by calling strncpy.

Source from the content-addressed store, hash-verified

1039// Done exclusively because in legacy mode, safe_interpret cannot fill the
1040// string up to the end by calling strncpy.
1041static void safe_strncpy(char* target, const char* source, size_t bs)
1042{
1043 if (!bs)
1044 return;
1045
1046 for (--bs; bs > 0 && *source; --bs)
1047 *target++ = *source++;
1048
1049 *target = 0;
1050}
1051
1052
1053// CVC: This special function for ADA has been restored to non-const vector,

Callers 1

safe_interpretFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected