MCPcopy Create free account
hub / github.com/cpputest/cpputest / MemCmp

Method MemCmp

src/CppUTest/SimpleString.cpp:218–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218int SimpleString::MemCmp(const void* s1, const void *s2, size_t n)
219{
220 const unsigned char* p1 = (const unsigned char*) s1;
221 const unsigned char* p2 = (const unsigned char*) s2;
222
223 while (n--)
224 if (*p1 != *p2) {
225 return *p1 - *p2;
226 } else {
227 ++p1;
228 ++p2;
229 }
230 return 0;
231}
232
233void SimpleString::deallocateInternalBuffer()
234{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected