Replace ternary with logical expressions in //components

Convert, e.g.
  x ? y : false -> x && y
  x ? false : y -> !x && y
  x ? y : true - > !x || y
  x ? true : y -> x || y

Bug: 416294715
Change-Id: I5b5cd2a2fffdc74ff4711352f0b80b28b168ff83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6898575
Reviewed-by: Sylvain Defresne <[email protected]>
Commit-Queue: Ho Cheung <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1508281}
NOKEYCHECK=True
GitOrigin-RevId: 6cdb114695626c964e5ee1cc4d8a9508639beb01
diff --git a/redaction_tool/redaction_tool.cc b/redaction_tool/redaction_tool.cc
index 4d267d6..569b4af 100644
--- a/redaction_tool/redaction_tool.cc
+++ b/redaction_tool/redaction_tool.cc
@@ -465,7 +465,7 @@
   IPAddress input_addr;
   if (input_addr.AssignFromIPLiteral(addr) && input_addr.IsValid()) {
     bool mapped = MaybeUnmapAddress(&input_addr);
-    bool translated = !mapped ? MaybeUntranslateAddress(&input_addr) : false;
+    bool translated = !mapped && MaybeUntranslateAddress(&input_addr);
     for (const auto& range : *kNonIdentifyingIPRanges) {
       if (IPAddressMatchesPrefix(input_addr, range.ip_addr,
                                  range.prefix_length)) {