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

Commit f31721fd authored by Ken Chen's avatar Ken Chen
Browse files

Fix unused-but-set-variable in res_query.cpp

warning: variable 'done' set but not used [-Wunused-but-set-variable]

Bug: N/A
Test: atest
Change-Id: I1e0ce0dea8cedae7520613597d2f48fa77200d1c
parent 41959e6a
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -237,8 +237,6 @@ int res_nsearch(ResState* statp, const char* name, /* domain name */
     *	- there is at least one dot and there is no trailing dot.
     */
    if ((!dots || (dots && !trailing_dot)) && !isMdnsResolution(statp->flags)) {
        int done = 0;

        /* Unfortunately we need to load network-specific info
         * (dns servers, search domains) before
         * the domain stuff is tried.  Will have a better
@@ -283,12 +281,8 @@ int res_nsearch(ResState* statp, const char* name, /* domain name */
                    if (hp->rcode == SERVFAIL) {
                        /* try next search element, if any */
                        got_servfail++;
                        break;
                    }
                    [[fallthrough]];
                default:
                    /* anything else implies that we're done */
                    done++;
                    break;
            }
        }
    }