Fix incorrect printf verb

tcpip.Error does not implement error and thus cannot be used with %w.

This was flagged by nogo.

PiperOrigin-RevId: 403458480
This commit is contained in:
Michael Pratt 2021-10-15 13:49:48 -07:00 committed by gVisor bot
parent 33b41d8fe9
commit 04dc27899b
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ func newNetstackImpl(mode string) (impl, error) {
AddressWithPrefix: parsedAddr.WithPrefix(),
}
if err := s.AddProtocolAddress(nicID, protocolAddr, stack.AddressProperties{}); err != nil {
return nil, fmt.Errorf("error adding IP address %+v to %q: %w", protocolAddr, *iface, err)
return nil, fmt.Errorf("error adding IP address %+v to %q: %s", protocolAddr, *iface, err)
}
subnet, err := tcpip.NewSubnet(parsedDest, parsedMask)