From 37b3a51ca6023de57b1ae414260c5cf1a4d3ac4a Mon Sep 17 00:00:00 2001 From: Sandboxed API Team Date: Mon, 18 Sep 2023 00:46:15 -0700 Subject: [PATCH] Use empty instead of length PiperOrigin-RevId: 566219114 Change-Id: I123e3cb8253d092b5d2d9c8e2a85cf5348c64a58 --- sandboxed_api/sandbox2/network_proxy/filtering.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandboxed_api/sandbox2/network_proxy/filtering.cc b/sandboxed_api/sandbox2/network_proxy/filtering.cc index cae2aa8..603aa92 100644 --- a/sandboxed_api/sandbox2/network_proxy/filtering.cc +++ b/sandboxed_api/sandbox2/network_proxy/filtering.cc @@ -196,7 +196,7 @@ absl::Status AllowedHosts::AllowIPv4(const std::string& ip, in_addr addr{}; in_addr m{}; - if (mask.length()) { + if (!mask.empty()) { SAPI_RETURN_IF_ERROR(IPStringToAddr(mask, AF_INET, &m)); if (!IsIPv4MaskCorrect(m.s_addr)) {