Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a81c815 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

DnsResolver/res_comp.cpp - fix bugprone-branch-clone warning



Fixes:
  packages/modules/DnsResolver/res_comp.cpp:151:37: error: repeated branch in conditional chain [bugprone-branch-clone,-warnings-as-errors]
          } else if (periodchar(pch)) {
                                      ^
  packages/modules/DnsResolver/res_comp.cpp:153:10: note: end of the original
          } else if (periodchar(nch) || nch == '\0') {
           ^
  packages/modules/DnsResolver/res_comp.cpp:153:52: note: clone 1 starts here
          } else if (periodchar(nch) || nch == '\0') {
                                                     ^

Test: builds
Bug: 153035880
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I30ced2efe9f75c3f0efc0401c38ec83ea9ac9e32
parent 4a79e3c3
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -148,9 +148,7 @@ bool res_hnok(const char* dn) {

        if (periodchar(ch)) {
            ;
        } else if (periodchar(pch)) {
            if (!borderchar(ch)) return false;
        } else if (periodchar(nch) || nch == '\0') {
        } else if (periodchar(pch) || periodchar(nch) || nch == '\0') {
            if (!borderchar(ch)) return false;
        } else {
            if (!middlechar(ch)) return false;