Commit 04f5b145 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2749] Remove redundant checks

parent 9eedd903
......@@ -250,19 +250,12 @@ uint8_t Option::getUint8() {
}
uint16_t Option::getUint16() {
if (data_.size() < sizeof(uint16_t) ) {
isc_throw(OutOfRange, "Attempt to read uint16 from option " << type_
<< " that has size " << data_.size());
}
// readUint16() checks and throws OutOfRange if data_ is too small.
return (readUint16(&data_[0], data_.size()));
}
uint32_t Option::getUint32() {
if (data_.size() < sizeof(uint32_t) ) {
isc_throw(OutOfRange, "Attempt to read uint32 from option " << type_
<< " that has size " << data_.size());
}
// readUint32() checks and throws OutOfRange if data_ is too small.
return (readUint32(&data_[0], data_.size()));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment