MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlStrncmp

Function xmlStrncmp

ThirdParty/libxml2/vtklibxml2/xmlstring.c:222–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 */
221
222int
223xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) {
224 if (len <= 0) return(0);
225 if (str1 == str2) return(0);
226 if (str1 == NULL) return(-1);
227 if (str2 == NULL) return(1);
228#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
229 return(strncmp((const char *)str1, (const char *)str2, len));
230#else
231 do {
232 int tmp = *str1++ - *str2;
233 if (tmp != 0 || --len == 0) return(tmp);
234 } while (*str2++ != 0);
235 return 0;
236#endif
237}
238
239static const xmlChar casemap[256] = {
240 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,

Callers 15

xmlCatalogUnWrapURNFunction · 0.85
xmlCatalogXMLResolveFunction · 0.85
xmlCatalogXMLResolveURIFunction · 0.85
xmlCatalogListXMLResolveFunction · 0.85
xmlValidateCheckMixedFunction · 0.85
htmlParseDocumentFunction · 0.85
htmlParseTryOrFinishFunction · 0.85
xmlNodeGetBaseSafeFunction · 0.85
xmlDetectEBCDICFunction · 0.85
xmlXPtrMatchStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected