]> Cypherpunks repositories - gostls13.git/commitdiff
debug/pe: gofmt
authorTobias Klauser <tklauser@distanz.ch>
Wed, 23 May 2018 12:04:48 +0000 (14:04 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Wed, 23 May 2018 12:26:19 +0000 (12:26 +0000)
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 <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/debug/pe/file.go
src/debug/pe/pe.go

index d1b1407f96937dfa2f5ad4b25d6130925ade3336..6fc1f3a60f4a17249abb21d1f9e47430b81d45a8 100644 (file)
@@ -269,9 +269,9 @@ func (f *File) ImportedSymbols() ([]string, error) {
                dd_length = f.OptionalHeader.(*OptionalHeader32).NumberOfRvaAndSizes
        }
 
-       // check that the length of data directory entries is large 
+       // check that the length of data directory entries is large
        // enough to include the imports directory.
-       if dd_length < IMAGE_DIRECTORY_ENTRY_IMPORT + 1 {
+       if dd_length < IMAGE_DIRECTORY_ENTRY_IMPORT+1 {
                return nil, nil
        }
 
@@ -287,7 +287,7 @@ func (f *File) ImportedSymbols() ([]string, error) {
        var ds *Section
        ds = nil
        for _, s := range f.Sections {
-               if s.VirtualAddress <= idd.VirtualAddress && idd.VirtualAddress < s.VirtualAddress + s.VirtualSize {
+               if s.VirtualAddress <= idd.VirtualAddress && idd.VirtualAddress < s.VirtualAddress+s.VirtualSize {
                        ds = s
                        break
                }
@@ -304,7 +304,7 @@ func (f *File) ImportedSymbols() ([]string, error) {
        }
 
        // seek to the virtual address specified in the import data directory
-       d = d[idd.VirtualAddress - ds.VirtualAddress:]
+       d = d[idd.VirtualAddress-ds.VirtualAddress:]
 
        // start decoding the import directory
        var ida []ImportDirectory
index 9eaf33c3101da3c91821fdb3f2fe73173ccf9997..872c977fe38801160eb163b1ea483a8cff86fa21 100644 (file)
@@ -111,20 +111,19 @@ const (
 
 // IMAGE_DIRECTORY_ENTRY constants
 const (
-       IMAGE_DIRECTORY_ENTRY_EXPORT = 0
-       IMAGE_DIRECTORY_ENTRY_IMPORT = 1
-       IMAGE_DIRECTORY_ENTRY_RESOURCE = 2
-       IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3
-       IMAGE_DIRECTORY_ENTRY_SECURITY = 4
-       IMAGE_DIRECTORY_ENTRY_BASERELOC = 5
-       IMAGE_DIRECTORY_ENTRY_DEBUG = 6
-       IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7
-       IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8
-       IMAGE_DIRECTORY_ENTRY_TLS = 9
-       IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10
-       IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11
-       IMAGE_DIRECTORY_ENTRY_IAT = 12
-       IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13
+       IMAGE_DIRECTORY_ENTRY_EXPORT         = 0
+       IMAGE_DIRECTORY_ENTRY_IMPORT         = 1
+       IMAGE_DIRECTORY_ENTRY_RESOURCE       = 2
+       IMAGE_DIRECTORY_ENTRY_EXCEPTION      = 3
+       IMAGE_DIRECTORY_ENTRY_SECURITY       = 4
+       IMAGE_DIRECTORY_ENTRY_BASERELOC      = 5
+       IMAGE_DIRECTORY_ENTRY_DEBUG          = 6
+       IMAGE_DIRECTORY_ENTRY_ARCHITECTURE   = 7
+       IMAGE_DIRECTORY_ENTRY_GLOBALPTR      = 8
+       IMAGE_DIRECTORY_ENTRY_TLS            = 9
+       IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG    = 10
+       IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT   = 11
+       IMAGE_DIRECTORY_ENTRY_IAT            = 12
+       IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT   = 13
        IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14
 )
-