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/processor/fast_source_line_resolver.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/processor/fast_source_line_resolver.cc') diff --git a/src/processor/fast_source_line_resolver.cc b/src/processor/fast_source_line_resolver.cc index 4a3d0007..3f8ec508 100644 --- a/src/processor/fast_source_line_resolver.cc +++ b/src/processor/fast_source_line_resolver.cc @@ -61,7 +61,7 @@ bool FastSourceLineResolver::ShouldDeleteMemoryBufferAfterLoadModule() { return false; } -void FastSourceLineResolver::Module::LookupAddress(StackFrame *frame) const { +void FastSourceLineResolver::Module::LookupAddress(StackFrame* frame) const { MemAddr address = frame->instruction - frame->module->base_address(); // First, look for a FUNC record that covers address. Use @@ -109,7 +109,7 @@ void FastSourceLineResolver::Module::LookupAddress(StackFrame *frame) const { // WFI: WindowsFrameInfo. // Returns a WFI object reading from a raw memory chunk of data -WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char *raw) { +WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char* raw) { const WindowsFrameInfo::StackInfoTypes type = static_cast( *reinterpret_cast(raw)); @@ -117,7 +117,7 @@ WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char *raw) { // The first 8 bytes of int data are unused. // They correspond to "StackInfoTypes type_;" and "int valid;" // data member of WFI. - const uint32_t *para_uint32 = reinterpret_cast( + const uint32_t* para_uint32 = reinterpret_cast( raw + 2 * sizeof(int32_t)); uint32_t prolog_size = para_uint32[0];; @@ -126,7 +126,7 @@ WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char *raw) { uint32_t saved_register_size = para_uint32[3]; uint32_t local_size = para_uint32[4]; uint32_t max_stack_size = para_uint32[5]; - const char *boolean = reinterpret_cast(para_uint32 + 6); + const char* boolean = reinterpret_cast(para_uint32 + 6); bool allocates_base_pointer = (*boolean != 0); string program_string = boolean + 1; @@ -145,15 +145,15 @@ WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char *raw) { // Does NOT take ownership of mem_buffer. // In addition, treat mem_buffer as const char*. bool FastSourceLineResolver::Module::LoadMapFromMemory( - char *memory_buffer, + char* memory_buffer, size_t memory_buffer_size) { if (!memory_buffer) return false; // Read the "is_corrupt" flag. - const char *mem_buffer = memory_buffer; + const char* mem_buffer = memory_buffer; mem_buffer = SimpleSerializer::Read(mem_buffer, &is_corrupt_); - const uint32_t *map_sizes = reinterpret_cast(mem_buffer); + const uint32_t* map_sizes = reinterpret_cast(mem_buffer); unsigned int header_size = kNumberMaps_ * sizeof(unsigned int); @@ -185,8 +185,8 @@ bool FastSourceLineResolver::Module::LoadMapFromMemory( return true; } -WindowsFrameInfo *FastSourceLineResolver::Module::FindWindowsFrameInfo( - const StackFrame *frame) const { +WindowsFrameInfo* FastSourceLineResolver::Module::FindWindowsFrameInfo( + const StackFrame* frame) const { MemAddr address = frame->instruction - frame->module->base_address(); scoped_ptr result(new WindowsFrameInfo()); @@ -238,8 +238,8 @@ WindowsFrameInfo *FastSourceLineResolver::Module::FindWindowsFrameInfo( return NULL; } -CFIFrameInfo *FastSourceLineResolver::Module::FindCFIFrameInfo( - const StackFrame *frame) const { +CFIFrameInfo* FastSourceLineResolver::Module::FindCFIFrameInfo( + const StackFrame* frame) const { MemAddr address = frame->instruction - frame->module->base_address(); MemAddr initial_base, initial_size; const char* initial_rules = NULL; -- cgit v1.2.1