compare: always use braces for for/if blocks

This commit is contained in:
Justin Viiret 2015-11-03 16:19:47 +11:00 committed by Matthew Barr
parent fb834114e5
commit ed4a3cdcf1

View File

@ -98,18 +98,22 @@ u64a theirtoupper64(const u64a x) {
static really_inline static really_inline
int cmpNocaseNaive(const u8 *p1, const u8 *p2, size_t len) { int cmpNocaseNaive(const u8 *p1, const u8 *p2, size_t len) {
const u8 *pEnd = (const u8 *)p1 + len; const u8 *pEnd = (const u8 *)p1 + len;
for (; p1 < pEnd; p1++, p2++) for (; p1 < pEnd; p1++, p2++) {
if (mytolower(*p1) != mytolower(*p2)) if (mytolower(*p1) != mytolower(*p2)) {
return 1; return 1;
}
}
return 0; return 0;
} }
static really_inline static really_inline
int cmpCaseNaive(const u8 *p1, const u8 *p2, size_t len) { int cmpCaseNaive(const u8 *p1, const u8 *p2, size_t len) {
const u8 *pEnd = (const u8 *)p1 + len; const u8 *pEnd = (const u8 *)p1 + len;
for (; p1 < pEnd; p1++, p2++) for (; p1 < pEnd; p1++, p2++) {
if (*p1 != *p2) if (*p1 != *p2) {
return 1; return 1;
}
}
return 0; return 0;
} }