From be82e64b3debcdb1d9ec6a149fc85af0d46bfb7e Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Fri, 9 Feb 2018 09:16:55 -0800 Subject: Autofix c casts to c++ casts --- test/core/http/httpcli_test.cc | 6 +++--- test/core/http/httpscli_test.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test/core/http') 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(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( - gpr_malloc((size_t)(lslash - me + sizeof("/../..")))); - memcpy(root, me, (size_t)(lslash - me)); + gpr_malloc(static_cast(lslash - me + sizeof("/../..")))); + memcpy(root, me, static_cast(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(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( - gpr_malloc((size_t)(lslash - me + sizeof("/../..")))); - memcpy(root, me, (size_t)(lslash - me)); + gpr_malloc(static_cast(lslash - me + sizeof("/../..")))); + memcpy(root, me, static_cast(lslash - me)); memcpy(root + (lslash - me), "/../..", sizeof("/../..")); } else { root = gpr_strdup("."); -- cgit v1.2.3