From: Yu Watanabe Date: Tue, 18 Feb 2025 18:02:32 +0000 (+0900) Subject: pe-binary: trivial coding style fixlets X-Git-Tag: v257.4~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e742418e52a75fe43f5fd9b04363d469997cb02;p=thirdparty%2Fsystemd.git pe-binary: trivial coding style fixlets (cherry picked from commit 2bf5d698d641afb1cec0b9ffb397722622afa8ea) --- diff --git a/src/shared/pe-binary.c b/src/shared/pe-binary.c index 173c5adf902..d754ac1aa5f 100644 --- a/src/shared/pe-binary.c +++ b/src/shared/pe-binary.c @@ -30,7 +30,7 @@ static size_t pe_header_size(const PeHeader *pe_header) { return offsetof(PeHeader, optional) + le16toh(pe_header->pe.SizeOfOptionalHeader); } -const IMAGE_DATA_DIRECTORY *pe_header_get_data_directory( +const IMAGE_DATA_DIRECTORY* pe_header_get_data_directory( const PeHeader *h, size_t i) { @@ -42,7 +42,7 @@ const IMAGE_DATA_DIRECTORY *pe_header_get_data_directory( return PE_HEADER_OPTIONAL_FIELD(h, DataDirectory) + i; } -const IMAGE_SECTION_HEADER *pe_section_table_find( +const IMAGE_SECTION_HEADER* pe_section_table_find( const IMAGE_SECTION_HEADER *sections, size_t n_sections, const char *name) { diff --git a/src/shared/pe-binary.h b/src/shared/pe-binary.h index eb0c8b3100d..a93493eb47c 100644 --- a/src/shared/pe-binary.h +++ b/src/shared/pe-binary.h @@ -138,9 +138,9 @@ bool pe_header_is_64bit(const PeHeader *h); #define PE_HEADER_OPTIONAL_FIELD_OFFSET(h, field) \ (pe_header_is_64bit(h) ? offsetof(PeHeader, optional.pe32plus_##field) : offsetof(PeHeader, optional.pe32_##field)) -const IMAGE_DATA_DIRECTORY *pe_header_get_data_directory(const PeHeader *h, size_t i); -const IMAGE_SECTION_HEADER *pe_header_find_section(const PeHeader *pe_header, const IMAGE_SECTION_HEADER *sections, const char *name); -const IMAGE_SECTION_HEADER *pe_section_table_find(const IMAGE_SECTION_HEADER *sections, size_t n_sections, const char *name); +const IMAGE_DATA_DIRECTORY* pe_header_get_data_directory(const PeHeader *h, size_t i); +const IMAGE_SECTION_HEADER* pe_header_find_section(const PeHeader *pe_header, const IMAGE_SECTION_HEADER *sections, const char *name); +const IMAGE_SECTION_HEADER* pe_section_table_find(const IMAGE_SECTION_HEADER *sections, size_t n_sections, const char *name); int pe_load_headers(int fd, IMAGE_DOS_HEADER **ret_dos_header, PeHeader **ret_pe_header);