summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2018-01-21 11:36:22 -0500
committerDavid Hill <[email protected]>2018-01-21 11:36:22 -0500
commitdb69d09d2c587e9b9677f991dfcab1fc24d9086e (patch)
tree3e42ab67bba8787faa1b50e83ecb5e89a2994e87
parentecdeabc65495df2dec95d7c4a4c3e021903035e5 (diff)
vet: fix vet warnings
-rw-r--r--spew/dump_test.go2
-rw-r--r--spew/format_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/spew/dump_test.go b/spew/dump_test.go
index 5aad9c7..4a31a2e 100644
--- a/spew/dump_test.go
+++ b/spew/dump_test.go
@@ -768,7 +768,7 @@ func addUintptrDumpTests() {
func addUnsafePointerDumpTests() {
// Null pointer.
- v := unsafe.Pointer(uintptr(0))
+ v := unsafe.Pointer(nil)
nv := (*unsafe.Pointer)(nil)
pv := &v
vAddr := fmt.Sprintf("%p", pv)
diff --git a/spew/format_test.go b/spew/format_test.go
index 0719eb9..87ee965 100644
--- a/spew/format_test.go
+++ b/spew/format_test.go
@@ -1083,7 +1083,7 @@ func addUintptrFormatterTests() {
func addUnsafePointerFormatterTests() {
// Null pointer.
- v := unsafe.Pointer(uintptr(0))
+ v := unsafe.Pointer(nil)
nv := (*unsafe.Pointer)(nil)
pv := &v
vAddr := fmt.Sprintf("%p", pv)