aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c8
-rw-r--r--src/core/lib/support/string.c2
-rw-r--r--src/core/lib/support/string.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index 6dbe9b70f3..6e8640f1b3 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -2024,7 +2024,7 @@ static char *format_flowctl_context_var(const char *context, const char *var,
if (context == NULL) {
*scope = NULL;
gpr_asprintf(&buf, "%s(%" PRId64 ")", var, val);
- result = gpr_strpad(buf, ' ', 40);
+ result = gpr_leftpad(buf, ' ', 40);
gpr_free(buf);
return result;
}
@@ -2037,7 +2037,7 @@ static char *format_flowctl_context_var(const char *context, const char *var,
gpr_free(tmp);
}
gpr_asprintf(&buf, "%s.%s(%" PRId64 ")", underscore_pos + 1, var, val);
- result = gpr_strpad(buf, ' ', 40);
+ result = gpr_leftpad(buf, ' ', 40);
gpr_free(buf);
return result;
}
@@ -2068,8 +2068,8 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase,
char *clisvr = is_client ? "client" : "server";
char *prefix;
- tmp_phase = gpr_strpad(phase, ' ', 8);
- tmp_scope1 = gpr_strpad(scope1, ' ', 11);
+ tmp_phase = gpr_leftpad(phase, ' ', 8);
+ tmp_scope1 = gpr_leftpad(scope1, ' ', 11);
gpr_asprintf(&prefix, "FLOW %s: %s %s ", phase, clisvr, scope1);
gpr_free(tmp_phase);
gpr_free(tmp_scope1);
diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c
index 789bd6408b..30c1e67647 100644
--- a/src/core/lib/support/string.c
+++ b/src/core/lib/support/string.c
@@ -194,7 +194,7 @@ int int64_ttoa(int64_t value, char *string) {
return i;
}
-char *gpr_strpad(const char *str, char flag, size_t length) {
+char *gpr_leftpad(const char *str, char flag, size_t length) {
const size_t str_length = strlen(str);
const size_t out_length = str_length > length ? str_length : length;
char *out = gpr_malloc(out_length + 1);
diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h
index 30f5aef766..2b6bb3eec6 100644
--- a/src/core/lib/support/string.h
+++ b/src/core/lib/support/string.h
@@ -85,7 +85,7 @@ void gpr_reverse_bytes(char *str, int len);
/* Pad a string with flag characters. The given length specifies the minimum
field width. The input string is never truncated. */
-char *gpr_strpad(const char *str, char flag, size_t length);
+char *gpr_leftpad(const char *str, char flag, size_t length);
/* Join a set of strings, returning the resulting string.
Total combined length (excluding null terminator) is returned in total_length