Use empty instead of length

PiperOrigin-RevId: 566219114
Change-Id: I123e3cb8253d092b5d2d9c8e2a85cf5348c64a58
This commit is contained in:
Sandboxed API Team 2023-09-18 00:46:15 -07:00 committed by Copybara-Service
parent f5830c93cd
commit 37b3a51ca6

View File

@ -196,7 +196,7 @@ absl::Status AllowedHosts::AllowIPv4(const std::string& ip,
in_addr addr{}; in_addr addr{};
in_addr m{}; in_addr m{};
if (mask.length()) { if (!mask.empty()) {
SAPI_RETURN_IF_ERROR(IPStringToAddr(mask, AF_INET, &m)); SAPI_RETURN_IF_ERROR(IPStringToAddr(mask, AF_INET, &m));
if (!IsIPv4MaskCorrect(m.s_addr)) { if (!IsIPv4MaskCorrect(m.s_addr)) {