aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2015-03-02 11:31:29 -0800
committerBrad Fitzpatrick <bradfitz@golang.org>2015-03-03 15:40:51 +0000
commitb50ff580ba6ffdaae895477c9953a76aafc70cd4 (patch)
tree65f098d9c8d6c91ce836c7545cb94cd1915770ee /src
parentce1c9247b06800d6698d03dcd68498729f7bfddd (diff)
downloadgo-b50ff580ba6ffdaae895477c9953a76aafc70cd4.tar.xz
cmd/internal/ld: minor int to bool cleanup
Change-Id: I3078385f5e7c92fbf99af7c4ae8918c86b9f86c9 Reviewed-on: https://go-review.googlesource.com/6500 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/internal/ld/lib.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/internal/ld/lib.go b/src/cmd/internal/ld/lib.go
index 030ddbf67a..7fd76b9410 100644
--- a/src/cmd/internal/ld/lib.go
+++ b/src/cmd/internal/ld/lib.go
@@ -266,7 +266,7 @@ var version int
// Set if we see an object compiled by the host compiler that is not
// from a package that is known to support internal linking mode.
-var externalobj int = 0
+var externalobj = false
var goroot string
@@ -394,7 +394,7 @@ func loadlib() {
}
if Linkmode == LinkAuto {
- if iscgo && externalobj != 0 {
+ if iscgo && externalobj {
Linkmode = LinkExternal
} else {
Linkmode = LinkInternal
@@ -670,10 +670,10 @@ var internalpkg = []string{
}
func ldhostobj(ld func(*Biobuf, string, int64, string), f *Biobuf, pkg string, length int64, pn string, file string) {
- isinternal := 0
+ isinternal := false
for i := 0; i < len(internalpkg); i++ {
if pkg == internalpkg[i] {
- isinternal = 1
+ isinternal = true
break
}
}
@@ -686,12 +686,12 @@ func ldhostobj(ld func(*Biobuf, string, int64, string), f *Biobuf, pkg string, l
// these relocation types.
if HEADTYPE == Hdragonfly {
if pkg == "net" || pkg == "os/user" {
- isinternal = 0
+ isinternal = false
}
}
- if isinternal == 0 {
- externalobj = 1
+ if !isinternal {
+ externalobj = true
}
hostobj = append(hostobj, Hostobj{})