From 724d5ca1b3bb0a2f7fd10658e38e2d35bae01265 Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Fri, 6 Sep 2024 03:13:29 +0200 Subject: [PATCH] Replace magic -2 with pcap_sys::PCAP_ERROR_BREAK constant --- src/sniff.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sniff.rs b/src/sniff.rs index 46a36cf..5640897 100644 --- a/src/sniff.rs +++ b/src/sniff.rs @@ -95,7 +95,7 @@ impl Cap { })) }, 0 => bail!("timeout expired"), - -2 => Ok(None), + pcap_sys::PCAP_ERROR_BREAK => Ok(None), _ => unreachable!(), } }