aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/http
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
committerGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
commitbe82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch)
treecc5e1234073eb250a2c319b5a4db2919fce060ea /test/core/http
parent194436342137924b4fb7429bede037a4b5ec7edb (diff)
Autofix c casts to c++ casts
Diffstat (limited to 'test/core/http')
-rw-r--r--test/core/http/httpcli_test.cc6
-rw-r--r--test/core/http/httpscli_test.cc6
2 files changed, 6 insertions, 6 deletions
diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc
index 3d892b939c..346568fcf2 100644
--- a/test/core/http/httpcli_test.cc
+++ b/test/core/http/httpcli_test.cc
@@ -157,14 +157,14 @@ int main(int argc, char** argv) {
char* root;
if (lslash != nullptr) {
/* Hack for bazel target */
- if ((unsigned)(lslash - me) >= (sizeof("http") - 1) &&
+ if (static_cast<unsigned>(lslash - me) >= (sizeof("http") - 1) &&
strncmp(me + (lslash - me) - sizeof("http") + 1, "http",
sizeof("http") - 1) == 0) {
lslash = me + (lslash - me) - sizeof("http");
}
root = static_cast<char*>(
- gpr_malloc((size_t)(lslash - me + sizeof("/../.."))));
- memcpy(root, me, (size_t)(lslash - me));
+ gpr_malloc(static_cast<size_t>(lslash - me + sizeof("/../.."))));
+ memcpy(root, me, static_cast<size_t>(lslash - me));
memcpy(root + (lslash - me), "/../..", sizeof("/../.."));
} else {
root = gpr_strdup(".");
diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc
index 7e99ad4249..a38f306ef3 100644
--- a/test/core/http/httpscli_test.cc
+++ b/test/core/http/httpscli_test.cc
@@ -157,14 +157,14 @@ int main(int argc, char** argv) {
char* root;
if (lslash != nullptr) {
/* Hack for bazel target */
- if ((unsigned)(lslash - me) >= (sizeof("http") - 1) &&
+ if (static_cast<unsigned>(lslash - me) >= (sizeof("http") - 1) &&
strncmp(me + (lslash - me) - sizeof("http") + 1, "http",
sizeof("http") - 1) == 0) {
lslash = me + (lslash - me) - sizeof("http");
}
root = static_cast<char*>(
- gpr_malloc((size_t)(lslash - me + sizeof("/../.."))));
- memcpy(root, me, (size_t)(lslash - me));
+ gpr_malloc(static_cast<size_t>(lslash - me + sizeof("/../.."))));
+ memcpy(root, me, static_cast<size_t>(lslash - me));
memcpy(root + (lslash - me), "/../..", sizeof("/../.."));
} else {
root = gpr_strdup(".");