]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
follow readability-braces-around-statements lint
authorn0tlu5 <darfisultoni@gmail.com>
Sat, 28 Dec 2024 09:55:53 +0000 (16:55 +0700)
committern0tlu5 <darfisultoni@gmail.com>
Sat, 28 Dec 2024 09:55:53 +0000 (16:55 +0700)
pdns/lua-record.cc

index cd10d732fe55606bdd8f6a8e2d6ecbce55fc2bd3..8dd0f83517f81a2cbff6faea09139bbe2cdd1d98 100644 (file)
@@ -1198,14 +1198,12 @@ static void setupLuaRecords(LuaContext& lua) // NOLINT(readability-function-cogn
       for (auto& entry : conv) {
         int weight = 0;
         weight = g_up.isUp(entry, url, opts);
-        if(weight>0){
+        if(weight>0)
           available = 1;
-        }
         items.emplace_back(weight, entry);
       }
-      if(available) {
+      if(available)
         return pickWeightedHashed<ComboAddress>(s_lua_record_ctx->bestwho, items).toString();
-      }
 
       // All units down, apply backupSelector on all candidates
       return pickWeightedRandom<ComboAddress>(items).toString();