mirror of https://github.com/v2ray/v2ray-core
fix compile warning
parent
582438ce5e
commit
42417cab17
|
@ -19,8 +19,8 @@ func (v *SRTP) Size() int {
|
||||||
|
|
||||||
func (v *SRTP) Write(b []byte) (int, error) {
|
func (v *SRTP) Write(b []byte) (int, error) {
|
||||||
v.number++
|
v.number++
|
||||||
b = serial.Uint16ToBytes(v.number, b[:0])
|
serial.Uint16ToBytes(v.number, b[:0])
|
||||||
b = serial.Uint16ToBytes(v.number, b)
|
serial.Uint16ToBytes(v.number, b[:2])
|
||||||
return 4, nil
|
return 4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,9 @@ func (v *UTP) Size() int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *UTP) Write(b []byte) (int, error) {
|
func (v *UTP) Write(b []byte) (int, error) {
|
||||||
b = serial.Uint16ToBytes(v.connectionId, b[:0])
|
serial.Uint16ToBytes(v.connectionId, b[:0])
|
||||||
b = append(b, v.header, v.extension)
|
b[2] = v.header
|
||||||
|
b[3] = v.extension
|
||||||
return 4, nil
|
return 4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue