// Precondition: the Uses and Defs maps are populated.
//
func (info *Info) ObjectOf(id *ast.Ident) Object {
- if obj, _ := info.Defs[id]; obj != nil {
+ if obj := info.Defs[id]; obj != nil {
return obj
}
return info.Uses[id]
so := &Status{Cookie: cookie(family, sotype, proto)}
sw.fmu.RLock()
- f, _ := sw.fltab[FilterSocket]
+ f := sw.fltab[FilterSocket]
sw.fmu.RUnlock()
af, err := f.apply(so)
return syscall.Close(s)
}
sw.fmu.RLock()
- f, _ := sw.fltab[FilterClose]
+ f := sw.fltab[FilterClose]
sw.fmu.RUnlock()
af, err := f.apply(so)
return syscall.Connect(s, sa)
}
sw.fmu.RLock()
- f, _ := sw.fltab[FilterConnect]
+ f := sw.fltab[FilterConnect]
sw.fmu.RUnlock()
af, err := f.apply(so)
return syscall.Listen(s, backlog)
}
sw.fmu.RLock()
- f, _ := sw.fltab[FilterListen]
+ f := sw.fltab[FilterListen]
sw.fmu.RUnlock()
af, err := f.apply(so)
return syscall.Accept(s)
}
sw.fmu.RLock()
- f, _ := sw.fltab[FilterAccept]
+ f := sw.fltab[FilterAccept]
sw.fmu.RUnlock()
af, err := f.apply(so)
return syscall.GetsockoptInt(s, level, opt)
}
sw.fmu.RLock()
- f, _ := sw.fltab[FilterGetsockoptInt]
+ f := sw.fltab[FilterGetsockoptInt]
sw.fmu.RUnlock()
af, err := f.apply(so)