pkg: clean up code format

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-07-21 15:48:44 -07:00 committed by Gyuho Lee
parent 3aef9a1a8f
commit 0b37ae05b1
2 changed files with 5 additions and 5 deletions

View File

@ -81,12 +81,12 @@ func (x *intervalNode) color() rbcolor {
return x.c
}
func (n *intervalNode) height() int {
if n == nil {
func (x *intervalNode) height() int {
if x == nil {
return 0
}
ld := n.left.height()
rd := n.right.height()
ld := x.left.height()
rd := x.right.height()
if ld < rd {
return rd + 1
}

View File

@ -27,7 +27,7 @@ var byteOrder binary.ByteOrder
func ByteOrder() binary.ByteOrder { return byteOrder }
func init() {
var i int = 0x1
i := int(0x1)
if v := (*[intWidth]byte)(unsafe.Pointer(&i)); v[0] == 0 {
byteOrder = binary.BigEndian
} else {