]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/ld: remove extraneous parentheses
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Sat, 4 Apr 2015 07:51:00 +0000 (20:51 +1300)
committerIan Lance Taylor <iant@golang.org>
Tue, 7 Apr 2015 01:40:40 +0000 (01:40 +0000)
Ian complained about these in a review and then submitted the change
before I could fix them.

Change-Id: I23d890db2f3648ed1003ed3d13e7247435b913e5
Reviewed-on: https://go-review.googlesource.com/8480
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/internal/ld/symtab.go

index d667d1ccc4a00126139d8d3ba7be58f2f8a6a83c..c6b39333e8280d1459bafc0218cff76ead6ac02c 100644 (file)
@@ -118,12 +118,12 @@ func putelfsym(x *LSym, s string, t int, addr int64, size int64, ver int, go_ *L
                        Diag("missing section in putelfsym")
                        return
                }
-               if (xo.Sect.(*Section)).Elfsect == nil {
+               if xo.Sect.(*Section).Elfsect == nil {
                        Ctxt.Cursym = x
                        Diag("missing ELF section in putelfsym")
                        return
                }
-               elfshnum = ((xo.Sect.(*Section)).Elfsect.(*ElfShdr)).shnum
+               elfshnum = xo.Sect.(*Section).Elfsect.(*ElfShdr).shnum
        }
 
        // One pass for each binding: STB_LOCAL, STB_GLOBAL,
@@ -148,7 +148,7 @@ func putelfsym(x *LSym, s string, t int, addr int64, size int64, ver int, go_ *L
 
        off := putelfstr(s)
        if Linkmode == LinkExternal && elfshnum != SHN_UNDEF {
-               addr -= int64((xo.Sect.(*Section)).Vaddr)
+               addr -= int64(xo.Sect.(*Section).Vaddr)
        }
        other := STV_DEFAULT
        if x.Type&SHIDDEN != 0 {