Skip to content

Commit 4bb649f

Browse files
committed
debug/pe: gofmt
CL 110555 introduced some changes which were not properly gofmt'ed. Because the CL was sent via Github the gofmt checks usually performed by git-codereview didn't catch this (see #24946). Change-Id: I65c1271620690dbeec88b4ce482d158f7d6df45d Reviewed-on: https://go-review.googlesource.com/114255 Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Alex Brainman <[email protected]>
1 parent 1174ad3 commit 4bb649f

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

src/debug/pe/file.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ func (f *File) ImportedSymbols() ([]string, error) {
269269
dd_length = f.OptionalHeader.(*OptionalHeader32).NumberOfRvaAndSizes
270270
}
271271

272-
// check that the length of data directory entries is large
272+
// check that the length of data directory entries is large
273273
// enough to include the imports directory.
274-
if dd_length < IMAGE_DIRECTORY_ENTRY_IMPORT + 1 {
274+
if dd_length < IMAGE_DIRECTORY_ENTRY_IMPORT+1 {
275275
return nil, nil
276276
}
277277

@@ -287,7 +287,7 @@ func (f *File) ImportedSymbols() ([]string, error) {
287287
var ds *Section
288288
ds = nil
289289
for _, s := range f.Sections {
290-
if s.VirtualAddress <= idd.VirtualAddress && idd.VirtualAddress < s.VirtualAddress + s.VirtualSize {
290+
if s.VirtualAddress <= idd.VirtualAddress && idd.VirtualAddress < s.VirtualAddress+s.VirtualSize {
291291
ds = s
292292
break
293293
}
@@ -304,7 +304,7 @@ func (f *File) ImportedSymbols() ([]string, error) {
304304
}
305305

306306
// seek to the virtual address specified in the import data directory
307-
d = d[idd.VirtualAddress - ds.VirtualAddress:]
307+
d = d[idd.VirtualAddress-ds.VirtualAddress:]
308308

309309
// start decoding the import directory
310310
var ida []ImportDirectory

src/debug/pe/pe.go

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,19 @@ const (
111111

112112
// IMAGE_DIRECTORY_ENTRY constants
113113
const (
114-
IMAGE_DIRECTORY_ENTRY_EXPORT = 0
115-
IMAGE_DIRECTORY_ENTRY_IMPORT = 1
116-
IMAGE_DIRECTORY_ENTRY_RESOURCE = 2
117-
IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3
118-
IMAGE_DIRECTORY_ENTRY_SECURITY = 4
119-
IMAGE_DIRECTORY_ENTRY_BASERELOC = 5
120-
IMAGE_DIRECTORY_ENTRY_DEBUG = 6
121-
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7
122-
IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8
123-
IMAGE_DIRECTORY_ENTRY_TLS = 9
124-
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10
125-
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11
126-
IMAGE_DIRECTORY_ENTRY_IAT = 12
127-
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13
114+
IMAGE_DIRECTORY_ENTRY_EXPORT = 0
115+
IMAGE_DIRECTORY_ENTRY_IMPORT = 1
116+
IMAGE_DIRECTORY_ENTRY_RESOURCE = 2
117+
IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3
118+
IMAGE_DIRECTORY_ENTRY_SECURITY = 4
119+
IMAGE_DIRECTORY_ENTRY_BASERELOC = 5
120+
IMAGE_DIRECTORY_ENTRY_DEBUG = 6
121+
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7
122+
IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8
123+
IMAGE_DIRECTORY_ENTRY_TLS = 9
124+
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10
125+
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11
126+
IMAGE_DIRECTORY_ENTRY_IAT = 12
127+
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13
128128
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14
129129
)
130-

0 commit comments

Comments
 (0)