From 09b056975dacd1f0f815ad820b6dc9913b0118a3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 23 Jun 2020 18:55:43 -0400 Subject: fix pointer style to match the style guide We do this in a lot of places, but we're inconsistent. Normalize the code to the Google C++ style guide. Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932 Reviewed-by: Sterling Augustine Reviewed-by: Mark Mentovai --- src/client/mac/tests/crash_generation_server_test.cc | 8 ++++---- src/client/mac/tests/exception_handler_test.cc | 14 +++++++------- src/client/mac/tests/minidump_generator_test.cc | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/client/mac/tests') diff --git a/src/client/mac/tests/crash_generation_server_test.cc b/src/client/mac/tests/crash_generation_server_test.cc index 0164f4a2..128f25c1 100644 --- a/src/client/mac/tests/crash_generation_server_test.cc +++ b/src/client/mac/tests/crash_generation_server_test.cc @@ -147,8 +147,8 @@ TEST_F(CrashGenerationServerTest, testRequestDumpNoDump) { globfree(&dirContents); } -void dumpCallback(void *context, const ClientInfo &client_info, - const std::string &file_path) { +void dumpCallback(void* context, const ClientInfo& client_info, + const std::string& file_path) { if (context) { CrashGenerationServerTest* self = reinterpret_cast(context); @@ -158,7 +158,7 @@ void dumpCallback(void *context, const ClientInfo &client_info, } } -void *RequestDump(void *context) { +void* RequestDump(void* context) { CrashGenerationClient client((const char*)context); bool result = client.RequestDump(); return (void*)(result ? 0 : 1); @@ -206,7 +206,7 @@ TEST_F(CrashGenerationServerTest, testRequestDump) { } static void Crasher() { - int *a = (int*)0x42; + int* a = (int*)0x42; fprintf(stdout, "Going to crash...\n"); fprintf(stdout, "A = %d", *a); diff --git a/src/client/mac/tests/exception_handler_test.cc b/src/client/mac/tests/exception_handler_test.cc index d5b505a1..50f03f81 100644 --- a/src/client/mac/tests/exception_handler_test.cc +++ b/src/client/mac/tests/exception_handler_test.cc @@ -71,7 +71,7 @@ class ExceptionHandlerTest : public Test { }; static void Crasher() { - int *a = (int*)0x42; + int* a = (int*)0x42; fprintf(stdout, "Going to crash...\n"); fprintf(stdout, "A = %d", *a); @@ -86,8 +86,8 @@ static void SoonToCrash(void(*crasher)()) { crasher(); } -static bool MDCallback(const char *dump_dir, const char *file_name, - void *context, bool success) { +static bool MDCallback(const char* dump_dir, const char* file_name, + void* context, bool success) { string path(dump_dir); path.append("/"); path.append(file_name); @@ -179,9 +179,9 @@ TEST_F(ExceptionHandlerTest, InProcessAbort) { InProcessCrash(true); } -static bool DumpNameMDCallback(const char *dump_dir, const char *file_name, - void *context, bool success) { - ExceptionHandlerTest *self = reinterpret_cast(context); +static bool DumpNameMDCallback(const char* dump_dir, const char* file_name, + void* context, bool success) { + ExceptionHandlerTest* self = reinterpret_cast(context); if (dump_dir && file_name) { self->lastDumpName = dump_dir; self->lastDumpName += "/"; @@ -652,7 +652,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) { ASSERT_EQ((unsigned int)1, memory_list->region_count()); } -static void *Junk(void *) { +static void* Junk(void*) { sleep(1000000); return NULL; } diff --git a/src/client/mac/tests/minidump_generator_test.cc b/src/client/mac/tests/minidump_generator_test.cc index b1fa5d02..1f374657 100644 --- a/src/client/mac/tests/minidump_generator_test.cc +++ b/src/client/mac/tests/minidump_generator_test.cc @@ -79,7 +79,7 @@ class MinidumpGeneratorTest : public Test { AutoTempDir tempDir; }; -static void *Junk(void* data) { +static void* Junk(void* data) { bool* wait = reinterpret_cast(data); while (!*wait) { usleep(10000); -- cgit v1.2.1