Skip to content

Commit

Permalink
Merge pull request pingcap#1041 from pingcap/coocod/shadow
Browse files Browse the repository at this point in the history
tidb-server/server: fix shadow found by Go 1.6 vet.
  • Loading branch information
coocood committed Apr 1, 2016
2 parents 09ebe28 + f26e18a commit b25d933
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tidb-server/server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,14 @@ func (cc *clientConn) writeResultset(rs ResultSet, binary bool) error {
columnLen := dumpLengthEncodedInt(uint64(len(columns)))
data := cc.alloc.AllocWithLen(4, 1024)
data = append(data, columnLen...)
if err := cc.writePacket(data); err != nil {
if err = cc.writePacket(data); err != nil {
return errors.Trace(err)
}

for _, v := range columns {
data = data[0:4]
data = append(data, v.Dump(cc.alloc)...)
if err := cc.writePacket(data); err != nil {
if err = cc.writePacket(data); err != nil {
return errors.Trace(err)
}
}
Expand Down Expand Up @@ -457,7 +457,7 @@ func (cc *clientConn) writeResultset(rs ResultSet, binary bool) error {
}
}

if err := cc.writePacket(data); err != nil {
if err = cc.writePacket(data); err != nil {
return errors.Trace(err)
}
row, err = rs.Next()
Expand Down

0 comments on commit b25d933

Please sign in to comment.