From 4ec5b9d2f761797bb34d05109f2f51a2d6e557d4 Mon Sep 17 00:00:00 2001 From: Sanket Date: Sun, 17 Mar 2024 23:01:07 +0530 Subject: [PATCH] cleaned up the code, formatted all the conditions in proper way. --- dummy.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dummy.cpp b/dummy.cpp index 5b114afb6..aea05e4be 100644 --- a/dummy.cpp +++ b/dummy.cpp @@ -137,8 +137,8 @@ int main(int argc, char *const argv[]) { return EXIT_FAILURE; } - if (!options.useFixed) { - options.setInputFile(); + if (::errorCount() > 0) { + return EXIT_FAILURE; } const IR::P4Program *program = nullptr; @@ -146,9 +146,6 @@ int main(int argc, char *const argv[]) { program = P4Dummy::parseDummyP4(options); } else { options.setInputFile(); - if (::errorCount() > 0) { - return EXIT_FAILURE; - } program = P4::parseP4File(options); }