Skip to content

Commit f9efd95

Browse files
committed
clang-foramt off/on
1 parent 2fc788a commit f9efd95

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/src/http_wasm.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ class HTTPFSClient : public HTTPClient {
3636
memset(z[i], 0, h.first.size() * 4 + 1);
3737
memcpy(z[i], h.first.c_str(), h.first.size());
3838
i++;
39-
z[i] = (char *)malloc(h.second.size() + 1);
40-
memset(z[i], 0, h.first.size() + 1);
39+
z[i] = (char *)malloc(h.second.size()*4 + 1);
40+
memset(z[i], 0, h.first.size() *4+ 1);
4141
memcpy(z[i], h.second.c_str(), h.second.size());
4242
i++;
4343
}
4444

45+
// clang-format off
4546
char *exe = NULL;
4647
exe = (char *)EM_ASM_PTR(
4748
{
@@ -100,6 +101,7 @@ class HTTPFSClient : public HTTPClient {
100101
return fileOnWasmHeap;
101102
},
102103
path.c_str(), n, z, "GET");
104+
// clang-format on
103105

104106
i = 0;
105107
for (auto h : info.headers) {
@@ -157,6 +159,7 @@ class HTTPFSClient : public HTTPClient {
157159
i++;
158160
}
159161

162+
// clang-format off
160163
char *exe = NULL;
161164
exe = (char *)EM_ASM_PTR(
162165
{
@@ -244,6 +247,7 @@ class HTTPFSClient : public HTTPClient {
244247
res->body = string(exe + 4, LEN);
245248
free(exe);
246249
}
250+
// clang-format on
247251

248252
return res;
249253
}

0 commit comments

Comments
 (0)