summaryrefslogtreecommitdiff
path: root/src/binary-reader-ir.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-reader-ir.cc')
-rw-r--r--src/binary-reader-ir.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc
index f4482f65..83d56747 100644
--- a/src/binary-reader-ir.cc
+++ b/src/binary-reader-ir.cc
@@ -29,12 +29,6 @@
#include "error-handler.h"
#include "ir.h"
-#define CHECK_RESULT(expr) \
- do { \
- if (Failed(expr)) \
- return Result::Error; \
- } while (0)
-
namespace wabt {
namespace {
@@ -274,9 +268,7 @@ Result BinaryReaderIR::TopLabel(LabelNode** label) {
Result BinaryReaderIR::AppendExpr(std::unique_ptr<Expr> expr) {
LabelNode* label;
- if (Failed(TopLabel(&label))) {
- return Result::Error;
- }
+ CHECK_RESULT(TopLabel(&label));
label->exprs->push_back(expr.release());
return Result::Ok;
}