From af745d824ebee17ef17e501eb2d169a6054c9dfc Mon Sep 17 00:00:00 2001 From: Craig Tiller <craig.tiller@gmail.com> Date: Mon, 14 Dec 2015 20:49:37 -0800 Subject: [PATCH] Fix build --- test/core/httpcli/httpcli_test.c | 4 ++-- test/core/httpcli/httpscli_test.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/core/httpcli/httpcli_test.c b/test/core/httpcli/httpcli_test.c index fc51cb0101..612388c61d 100644 --- a/test/core/httpcli/httpcli_test.c +++ b/test/core/httpcli/httpcli_test.c @@ -151,11 +151,11 @@ int main(int argc, char **argv) { /* figure out where we are */ char *root; if (lslash) { - root = gpr_malloc(lslash - me + 1); + root = gpr_malloc((size_t)(lslash - me + 1)); memcpy(root, me, (size_t)(lslash - me)); root[lslash - me] = 0; } else { - root = strdup("."); + root = gpr_strdup("."); } gpr_asprintf(&args[0], "%s/../../test/core/httpcli/test_server.py", root); gpr_free(root); diff --git a/test/core/httpcli/httpscli_test.c b/test/core/httpcli/httpscli_test.c index 4cfa9e59b0..ba5660bd18 100644 --- a/test/core/httpcli/httpscli_test.c +++ b/test/core/httpcli/httpscli_test.c @@ -153,11 +153,11 @@ int main(int argc, char **argv) { /* figure out where we are */ char *root; if (lslash) { - root = gpr_malloc(lslash - me + 1); + root = gpr_malloc((size_t)(lslash - me + 1)); memcpy(root, me, (size_t)(lslash - me)); root[lslash - me] = 0; } else { - strcpy(root, "."); + root = gpr_strdup("."); } gpr_asprintf(&args[0], "%s/../../test/core/httpcli/test_server.py", root); gpr_free(root); -- GitLab