From 44d3cc7daf4eb011b04f3930cb70b22bfe171239 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Tue, 9 Aug 2011 13:15:25 +0200 Subject: [PATCH] kill another make() --- client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index eb9f6e7c..cdae1c68 100644 --- a/client.go +++ b/client.go @@ -397,9 +397,8 @@ func (w *reply) writeClient(p []byte) (n int, err os.Error) { return 0, io.ErrShortBuffer } for a := 0; a < w.Client().Attempts; a++ { - l := make([]byte, 2) - l[0], l[1] = packUint16(uint16(len(p))) - n, err = w.conn.Write(l) + a, b := packUint16(uint16(len(p))) + n, err = w.conn.Write([]byte{a, b}) if err != nil { if e, ok := err.(net.Error); ok && e.Timeout() { continue