From: Francis Dupont Date: Wed, 24 Jun 2015 11:21:33 +0000 (+0200) Subject: [3919] use last_offset late to avoid cppcheck new warnings X-Git-Tag: trac3911_base~5^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09638ba65b32e57ed6027fa98a64e57ccc19360f;p=thirdparty%2Fkea.git [3919] use last_offset late to avoid cppcheck new warnings --- diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc index b08c05228e..ea5780b4ef 100644 --- a/src/lib/dhcp/libdhcp++.cc +++ b/src/lib/dhcp/libdhcp++.cc @@ -363,7 +363,8 @@ size_t LibDHCP::unpackOptions6(const OptionBuffer& buf, offset += opt_len; } - return (offset); + last_offset = offset; + return (last_offset); } size_t LibDHCP::unpackOptions4(const OptionBuffer& buf, @@ -463,7 +464,8 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf, options.insert(std::make_pair(opt_type, opt)); offset += opt_len; } - return (offset); + last_offset = offset; + return (last_offset); } size_t LibDHCP::unpackVendorOptions6(const uint32_t vendor_id,