]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1528] Nitpick comparison optimization in Linux version of ifacemgr
authorTomek Mrugalski <tomasz@isc.org>
Tue, 8 May 2012 12:50:29 +0000 (14:50 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 8 May 2012 12:50:29 +0000 (14:50 +0200)
src/lib/dhcp/iface_mgr_linux.cc

index e26da5a1b4d67a905d1a3773568a56b5abd27cd6..d2f7ff4ddf4aa12e52677973f2cbd3dd22e37806 100644 (file)
@@ -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);