mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix review comments
Signed-off-by: dhilipkumars <dhilip.kumar.s@huawei.com>
This commit is contained in:
parent
9376cd3c63
commit
79a76217db
2 changed files with 4 additions and 6 deletions
|
@ -55,13 +55,13 @@ func lookupFwMethod(fwMethod uint32) string {
|
|||
}
|
||||
|
||||
func checkDestination(t *testing.T, i *Handle, s *Service, d *Destination, checkPresent bool) {
|
||||
dstFound := false
|
||||
var dstFound bool
|
||||
|
||||
dstArray, err := i.GetDestinations(s)
|
||||
require.NoError(t, err)
|
||||
|
||||
for _, dst := range dstArray {
|
||||
if dst.Address.String() == d.Address.String() && dst.Port == d.Port && lookupFwMethod(dst.ConnectionFlags) == lookupFwMethod(d.ConnectionFlags) {
|
||||
if dst.Address.Equal(d.Address) && dst.Port == d.Port && lookupFwMethod(dst.ConnectionFlags) == lookupFwMethod(d.ConnectionFlags) {
|
||||
dstFound = true
|
||||
break
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ func checkService(t *testing.T, i *Handle, s *Service, checkPresent bool) {
|
|||
svcArray, err := i.GetServices()
|
||||
require.NoError(t, err)
|
||||
|
||||
svcFound := false
|
||||
var svcFound bool
|
||||
|
||||
for _, svc := range svcArray {
|
||||
|
||||
|
|
|
@ -225,7 +225,6 @@ done:
|
|||
return nil, err
|
||||
}
|
||||
for _, m := range msgs {
|
||||
|
||||
if m.Header.Seq != req.Seq {
|
||||
continue
|
||||
}
|
||||
|
@ -235,7 +234,6 @@ done:
|
|||
if m.Header.Type == syscall.NLMSG_DONE {
|
||||
break done
|
||||
}
|
||||
|
||||
if m.Header.Type == syscall.NLMSG_ERROR {
|
||||
error := int32(native.Uint32(m.Data[0:4]))
|
||||
if error == 0 {
|
||||
|
@ -396,7 +394,7 @@ func (i *Handle) doGetServicesCmd(svc *Service) ([]*Service, error) {
|
|||
for _, msg := range msgs {
|
||||
srv, err := i.parseService(msg)
|
||||
if err != nil {
|
||||
return res, err
|
||||
return nil, err
|
||||
}
|
||||
res = append(res, srv)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue