MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / strcmp

Function strcmp

rEFIt_UEFI/Platform/Posix/string.cpp:30–46  ·  view source on GitHub ↗

* Taken from glibc. Seems not optimized at all... */ Compare S1 and S2, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */

Source from the content-addressed store, hash-verified

28 greater than zero if S1 is lexicographically less than,
29 equal to or greater than S2. */
30int strcmp (const char *p1, const char *p2)
31{
32 const unsigned char *s1 = (const unsigned char *) p1;
33 const unsigned char *s2 = (const unsigned char *) p2;
34 unsigned char c1, c2;
35
36 do
37 {
38 c1 = (unsigned char) *s1++;
39 c2 = (unsigned char) *s2++;
40 if (c1 == '\0')
41 return c1 - c2;
42 }
43 while (c1 == c2);
44
45 return c1 - c2;
46}
47#endif
48
49

Callers 15

checkDevicePath2Function · 0.50
testPrintfFunction · 0.50
testPrintfFunction · 0.50
compareFunction · 0.50
GetTextExecMethod · 0.50
Get_PreLinkMethod · 0.50
XMLParseNextTagFunction · 0.50
FixDataMatchingTagFunction · 0.50
nsvg__findGradientDataFunction · 0.50
nsvg__addShapeFunction · 0.50
nsvg__parseColorNameFunction · 0.50

Calls

no outgoing calls

Tested by 15

testPrintfFunction · 0.40
testPrintfFunction · 0.40
compareFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40