fix compile warning

pull/314/merge
Darien Raymond 8 years ago
parent 582438ce5e
commit 42417cab17
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -19,8 +19,8 @@ func (v *SRTP) Size() int {
func (v *SRTP) Write(b []byte) (int, error) {
v.number++
b = serial.Uint16ToBytes(v.number, b[:0])
b = serial.Uint16ToBytes(v.number, b)
serial.Uint16ToBytes(v.number, b[:0])
serial.Uint16ToBytes(v.number, b[:2])
return 4, nil
}

@ -19,8 +19,9 @@ func (v *UTP) Size() int {
}
func (v *UTP) Write(b []byte) (int, error) {
b = serial.Uint16ToBytes(v.connectionId, b[:0])
b = append(b, v.header, v.extension)
serial.Uint16ToBytes(v.connectionId, b[:0])
b[2] = v.header
b[3] = v.extension
return 4, nil
}

Loading…
Cancel
Save