Skip to content

Commit

Permalink
Return "0" for --help and --version (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer authored Oct 29, 2024
1 parent 6804b68 commit 09173a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fmusim/fmusim.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int main(int argc, const char* argv[]) {
FMIRecorder* initialRecorder = NULL;
FMIRecorder* recorder = NULL;
const char* unzipdir = NULL;
FMIStatus status = FMIFatal;
FMIStatus status = FMIOK;
bool earlyReturnAllowed = false;
bool eventModeUsed = false;
bool recordIntermediateValues = false;
Expand Down Expand Up @@ -284,6 +284,7 @@ int main(int argc, const char* argv[]) {
s_logFile = fopen(logFile, "w");
if (!s_logFile) {
printf("Failed to open log file %s for writing.\n", logFile);
status = FMIError;
goto TERMINATE;
}
}
Expand All @@ -292,6 +293,7 @@ int main(int argc, const char* argv[]) {
s_fmiLogFile = fopen(fmiLogFile, "w");
if (!s_fmiLogFile) {
printf("Failed to open FMI log file %s for writing.\n", fmiLogFile);
status = FMIError;
goto TERMINATE;
}
}
Expand Down

0 comments on commit 09173a5

Please sign in to comment.