aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/support
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-11-03 08:45:27 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-11-03 08:45:27 -0700
commit47f1084ce835d4288ddfa9f280e07d0a8d5719c5 (patch)
tree838d1c605b33d7f8eb22fadde5ecdc808b137379 /src/core/lib/support
parent6ad80579de9f995ec210f40447bffe986cd4cb98 (diff)
clang-format
Diffstat (limited to 'src/core/lib/support')
-rw-r--r--src/core/lib/support/string.c4
-rw-r--r--src/core/lib/support/string.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c
index 56f29492bf..165b3189a5 100644
--- a/src/core/lib/support/string.c
+++ b/src/core/lib/support/string.c
@@ -196,8 +196,8 @@ int int64_ttoa(int64_t value, char *string) {
return i;
}
-int gpr_parse_nonnegative_number(const char* value) {
- char* end;
+int gpr_parse_nonnegative_number(const char *value) {
+ char *end;
long result = strtol(value, &end, 0);
if (*end != '\0' || result < 0 || result > INT_MAX) return -1;
return (int)result;
diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h
index 3a5a8ed826..34fd154a83 100644
--- a/src/core/lib/support/string.h
+++ b/src/core/lib/support/string.h
@@ -81,7 +81,7 @@ where long is 32bit is size.*/
int int64_ttoa(int64_t value, char *output);
// Parses a non-negative number from a value string. Returns -1 on error.
-int gpr_parse_nonnegative_number(const char* value);
+int gpr_parse_nonnegative_number(const char *value);
/* Reverse a run of bytes */
void gpr_reverse_bytes(char *str, int len);