thomas.mertes@gmx.at writes:
for (main_idx = 0; main_idx < main_str->Length / sizeof(WCHAR); main_idx++) {
search_idx = 0;
while (search_idx < search_chars->Length / sizeof(WCHAR) &&
main_str->Buffer[main_idx] != search_chars->Buffer[search_idx]) {
search_idx++;
} /* if */
if (search_idx >= search_chars->Length / sizeof(WCHAR)) {
*pos = (main_idx + 1) * sizeof(WCHAR);
return STATUS_SUCCESS;
} /* if */
} /* if */
I'm not sure why you feel necessary to add /* if */ on every single closing brace, IMO it just adds noise to the code for no good reason. Anyway, I can live with it as long as it's actually the closing brace of an if, but adding /* if */ at the end of for and while loops is going a bit too far ;-)