- Timestamp:
- Jan 6, 2022 10:02:15 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strncmp.cpp
r93130 r93135 39 39 #endif 40 40 { 41 const char* fini = pszStr1+cb; 42 while (pszStr1 < fini) 41 while (cb-- > 0) 43 42 { 44 int res=*pszStr1-*pszStr2;45 i f (res)46 return res;47 if (!*pszStr1)48 return 0;49 ++pszStr1; ++pszStr2;43 char const ch1 = *pszStr1++; 44 int const iDiff = ch1 - *pszStr2++; 45 if (iDiff) 46 return iDiff; 47 if (!ch1) 48 break; 50 49 } 51 50 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.