Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Oct 12, 2023
1 parent 1739cfb commit 0070277
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -905,9 +905,9 @@ MappedFile<Context> *MappedFile<Context>::open(Context &ctx, std::string path) {

i64 fd;
#ifdef _WIN32
fd = ::_open(path.c_str(), O_RDONLY);
fd = ::_open(path.c_str(), O_RDONLY);
#else
fd = ::open(path.c_str(), O_RDONLY);
fd = ::open(path.c_str(), O_RDONLY);
#endif

if (fd == -1) {
Expand Down Expand Up @@ -943,7 +943,7 @@ MappedFile<Context> *MappedFile<Context>::open(Context &ctx, std::string path) {
if (mf->data == MAP_FAILED)
Fatal(ctx) << path << ": mmap failed: " << errno_string();
#endif
}
}

close(fd);
return mf;
Expand Down
2 changes: 1 addition & 1 deletion elf/dwarf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ read_address_areas(Context<E> &ctx, ObjectFile<E> &file, i64 offset) {
// Handle non-contiguous address ranges.
if (ranges.form) {
if (dwarf_version <= 4) {
Word<E> *range_begin =
Word<E> *range_begin =
(Word<E> *)(get_buffer(ctx, ctx.debug_ranges) + ranges.value);
return read_debug_range<E>(range_begin);
}
Expand Down

0 comments on commit 0070277

Please sign in to comment.