all: use buildfeatures.HasCapture const in a handful of places
Help out the linker's dead code elimination. Updates #12614 Change-Id: I6c13cb44d3250bf1e3a01ad393c637da4613affb Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
8fe575409f
commit
b54cdf9f38
@@ -890,6 +890,9 @@ func deregisterMetrics(m *metrics) {
|
||||
// can be called with a nil argument to uninstall the capture
|
||||
// hook.
|
||||
func (c *Conn) InstallCaptureHook(cb packet.CaptureCallback) {
|
||||
if !buildfeatures.HasCapture {
|
||||
return
|
||||
}
|
||||
c.captureHook.Store(cb)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user