Skip to content
Snippets Groups Projects
Commit f4050350 authored by Craig Tiller's avatar Craig Tiller
Browse files

More Windows Fixes

parent 6108d1fe
No related branches found
No related tags found
No related merge requests found
...@@ -99,12 +99,16 @@ static void end_test(grpc_end2end_test_fixture *f) { ...@@ -99,12 +99,16 @@ static void end_test(grpc_end2end_test_fixture *f) {
static gpr_slice generate_random_slice() { static gpr_slice generate_random_slice() {
size_t i; size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
char output[1024 * 1024]; char *output;
for (i = 0; i < GPR_ARRAY_SIZE(output) - 1; ++i) { const size_t output_size = 1024 * 1024;
output = gpr_malloc(output_size);
for (i = 0; i < output_size - 1; ++i) {
output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
} }
output[GPR_ARRAY_SIZE(output) - 1] = '\0'; output[output_size - 1] = '\0';
return gpr_slice_from_copied_string(output); gpr_slice out = gpr_slice_from_copied_string(output);
gpr_free(output);
return out;
} }
void resource_quota_server(grpc_end2end_test_config config) { void resource_quota_server(grpc_end2end_test_config config) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment