forked from quic-go/quic-go
remove error return value from ComposeVersionNegotiation (#3410)
This commit is contained in:
@@ -24,11 +24,7 @@ func getVNP(src, dest protocol.ConnectionID, numVersions int) []byte {
|
||||
for i := 0; i < numVersions; i++ {
|
||||
versions[i] = protocol.VersionNumber(rand.Uint32())
|
||||
}
|
||||
data, err := wire.ComposeVersionNegotiation(src, dest, versions)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return data
|
||||
return wire.ComposeVersionNegotiation(src, dest, versions)
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -91,8 +91,6 @@ func fuzzVNP(data []byte) int {
|
||||
if len(versions) == 0 {
|
||||
panic("no versions")
|
||||
}
|
||||
if _, err := wire.ComposeVersionNegotiation(hdr.SrcConnectionID, hdr.DestConnectionID, versions); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
wire.ComposeVersionNegotiation(hdr.SrcConnectionID, hdr.DestConnectionID, versions)
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user