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

Function CMP_check

src/gpre/cmp.cpp:96–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94//
95
96void CMP_check( gpre_req* request, SSHORT min_reqd)
97{
98 const int length = request->req_blr - request->req_base;
99 if (!min_reqd && (length < request->req_length - 100))
100 return;
101
102 const int n = ((length + min_reqd + 100) > request->req_length * 2) ?
103 length + min_reqd + 100 : request->req_length * 2;
104
105 UCHAR* const old = request->req_base;
106 UCHAR* p = MSC_alloc(n);
107 request->req_base = p;
108 request->req_length = n;
109 request->req_blr = request->req_base + length;
110
111 memcpy(p, old, length);
112
113 MSC_free(old);
114}
115
116
117//____________________________________________________________

Callers 7

STUFF_CHECKFunction · 0.85
cmp_assignmentFunction · 0.85
cmp_forFunction · 0.85
cmp_portFunction · 0.85
CME_relationFunction · 0.85
cmp_arrayFunction · 0.85
cmp_fieldFunction · 0.85

Calls 2

MSC_allocFunction · 0.85
MSC_freeFunction · 0.85

Tested by

no test coverage detected