Skip to content

Commit

Permalink
Remove the redundant code, also fix the misleading comment in the code (
Browse files Browse the repository at this point in the history
#3)

After PR #2 the else condition code becomes redundant this PR fixes
this. Also the comment is misleading in my view hence fixed that also.
  • Loading branch information
Sanket-0510 committed Mar 17, 2024
1 parent 4eccbfa commit 9ebe695
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,15 @@ 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;
if (options.useFixed) {
program = P4Dummy::parseDummyP4(options);
} else {
options.setInputFile();
if (::errorCount() > 0) {
return EXIT_FAILURE;
}
program = P4::parseP4File(options);
}

Expand Down

0 comments on commit 9ebe695

Please sign in to comment.