Parcourir la source

[1528] Nitpick comparison optimization in Linux version of ifacemgr

Tomek Mrugalski il y a 13 ans
Parent
commit
67a08ea405
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/lib/dhcp/iface_mgr_linux.cc

+ 1 - 1
src/lib/dhcp/iface_mgr_linux.cc

@@ -252,7 +252,7 @@ void Netlink::parse_rtattr(RTattribPtrs& table, struct rtattr* rta, int len)
     // immediately follows pointed rta structure. See aforementioned
     // header for details.
     while (RTA_OK(rta, len)) {
-        if (rta->rta_type <= table.size()-1) {
+        if (rta->rta_type < table.size()) {
             table[rta->rta_type] = rta;
         }
         rta = RTA_NEXT(rta,len);