Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Aug 29, 2023
1 parent 7e56ac9 commit a7da299
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions testing/fuzzing/fuzz_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ static constexpr Tox_Random_Funcs fuzz_random_funcs = {
![](Fuzz_System *self, uint32_t upper_bound) {
uint32_t randnum = 0;
if (upper_bound > 0) {
self->rng->funcs->bytes_callback(self, reinterpret_cast<uint8_t *>(&randnum), sizeof(randnum));
self->rng->funcs->bytes_callback(
self, reinterpret_cast<uint8_t *>(&randnum), sizeof(randnum));
randnum %= upper_bound;
}
return randnum;
Expand Down Expand Up @@ -198,7 +199,9 @@ static constexpr Tox_Memory_Funcs null_memory_funcs = {
/* .calloc = */
![](Null_System *self, uint32_t nmemb, uint32_t size) { return std::calloc(nmemb, size); },
/* .realloc = */
![](Null_System *self, void *ptr, uint32_t nmemb, uint32_t size) { return std::realloc(ptr, nmemb * size); },
![](Null_System *self, void *ptr, uint32_t nmemb, uint32_t size) {
return std::realloc(ptr, nmemb * size);
},
/* .free = */
![](Null_System *self, void *ptr) { std::free(ptr); },
};
Expand Down
3 changes: 2 additions & 1 deletion toxcore/group_announce_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ void TestDoGca(Fuzz_Data &input)
[](void *user_data) { return *static_cast<uint64_t *>(user_data); },
};
uint64_t clock = 1;
std::unique_ptr<Tox_Time, void (*)(Tox_Time *)> tm(tox_time_new(&mock_time_funcs, &clock, mem), tox_time_free);
std::unique_ptr<Tox_Time, void (*)(Tox_Time *)> tm(
tox_time_new(&mock_time_funcs, &clock, mem), tox_time_free);
std::unique_ptr<Mono_Time, std::function<void(Mono_Time *)>> mono_time(
mono_time_new(mem, tm.get()), [mem](Mono_Time *ptr) { mono_time_free(mem, ptr); });
assert(mono_time != nullptr);
Expand Down

0 comments on commit a7da299

Please sign in to comment.