Skip to content
Snippets Groups Projects
Commit a13ec951 authored by Yuchen Zeng's avatar Yuchen Zeng
Browse files

Remove for loop initial declarations

parent ddebfa65
No related branches found
No related tags found
No related merge requests found
...@@ -279,7 +279,8 @@ int gpr_stricmp(const char *a, const char *b) { ...@@ -279,7 +279,8 @@ int gpr_stricmp(const char *a, const char *b) {
void *gpr_memrchr(const void *s, int c, size_t n) { void *gpr_memrchr(const void *s, int c, size_t n) {
if (s == NULL) return NULL; if (s == NULL) return NULL;
char *b = (char *)s; char *b = (char *)s;
for (size_t i = 0; i < n; i++) { size_t i;
for (i = 0; i < n; i++) {
if (b[n - i - 1] == c) { if (b[n - i - 1] == c) {
return &b[n - i - 1]; return &b[n - i - 1];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment