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

Commit 8208089a authored by Ken Chen's avatar Ken Chen
Browse files

Fix unused-but-set-variable

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

Bug: N/A
Test: atest
Change-Id: Ieb0d8a7c334deb0c04c8a908131da93557c5955d
parent c6a574d5
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -1817,8 +1817,6 @@ static int res_searchN(const char* name, res_target* target, ResState* res, int*
     * - this is not a .local mDNS lookup.
     */
    if ((!dots || (dots && !trailing_dot)) && !isMdnsResolution(res->flags)) {
        int done = 0;

        /* Unfortunately we need to set stuff up before
         * the domain stuff is tried.  Will have a better
         * fix after thread pools are used.
@@ -1858,12 +1856,8 @@ static int res_searchN(const char* name, res_target* target, ResState* res, int*
                    if (hp->rcode == SERVFAIL) {
                        /* try next search element, if any */
                        got_servfail++;
                        break;
                    }
                    [[fallthrough]];
                default:
                    /* anything else implies that we're done */
                    done++;
                    break;
            }
        }
    }