aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <y-zeng@users.noreply.github.com>2016-12-30 02:02:56 +0800
committerGravatar GitHub <noreply@github.com>2016-12-30 02:02:56 +0800
commit1ef7b1d6b47dd76f2eb1b726820e5af5fefbbb73 (patch)
tree4f56d83b1f984ad8c29609220e75e556a1fa28e7 /src
parentddebfa65f2bdff332902adf73606bc050014b498 (diff)
parenta13ec951b996b855a4e82a22269cc9693a51b030 (diff)
Merge pull request #9208 from y-zeng/for-loop
Remove for loop initial declarations
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/support/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c
index f263f82baf..426fce28f8 100644
--- a/src/core/lib/support/string.c
+++ b/src/core/lib/support/string.c
@@ -279,7 +279,8 @@ int gpr_stricmp(const char *a, const char *b) {
void *gpr_memrchr(const void *s, int c, size_t n) {
if (s == NULL) return NULL;
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) {
return &b[n - i - 1];
}