face/rib/tools: avoid deprecate Block::fromBuffer overloads
refs #2553
Change-Id: I32ea424ab7547f59fea2fca70ad6f41cd90bab58
diff --git a/tools/ndn-autoconfig/multicast-discovery.cpp b/tools/ndn-autoconfig/multicast-discovery.cpp
index 59db21f..ae3e72d 100644
--- a/tools/ndn-autoconfig/multicast-discovery.cpp
+++ b/tools/ndn-autoconfig/multicast-discovery.cpp
@@ -63,13 +63,13 @@
size_t offset = 0;
while (offset < buffer->size()) {
+ bool isOk = false;
Block block;
- bool ok = Block::fromBuffer(buffer, offset, block);
- if (!ok)
- {
- std::cerr << "ERROR: cannot decode FaceStatus TLV" << std::endl;
- break;
- }
+ std::tie(isOk, block) = Block::fromBuffer(buffer, offset);
+ if (!isOk) {
+ std::cerr << "ERROR: cannot decode FaceStatus TLV" << std::endl;
+ break;
+ }
offset += block.size();