]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Moved to a plain if in getOptionCode()
authorFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 22:10:37 +0000 (00:10 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 22:10:37 +0000 (00:10 +0200)
src/lib/dhcp/option_vendor_class.h

index e4a86648371336de153d5b565d450361bcf63036..a3143547db0345ccd3ae33791fea3edbb5a10481 100644 (file)
@@ -156,7 +156,11 @@ private:
     /// @param u universe (V4 or V6).
     /// @return DHCPv4 V-I Vendor Class or DHCPv6 Vendor Class option code.
     static uint16_t getOptionCode(Option::Universe u) {
-        return (u == V4 ? DHO_VIVCO_SUBOPTIONS : D6O_VENDOR_CLASS);
+        if (u == V4} {
+            return (DHO_VIVCO_SUBOPTIONS);
+        } else {
+            return (D6O_VENDOR_CLASS);
+        }
     }
 
     /// @brief Returns the tuple length field type for the given universe.