diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-11-02 11:33:09 -0400 | 
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-11-02 11:33:09 -0400 | 
| commit | 46ae10e55603b8852612ebe12c7636c2b358bdd6 (patch) | |
| tree | 897a87316c280b6824892368662afcb848de1cf6 | |
| parent | 6a59078759bdae86dacffe88ec737d1e8460761b (diff) | |
| download | stasis-46ae10e55603b8852612ebe12c7636c2b358bdd6.tar.gz | |
Clarify the conditional SUCCESS/FAIL branching a bitsafety-and-convenience
| -rw-r--r-- | src/lib/core/envctl.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/src/lib/core/envctl.c b/src/lib/core/envctl.c index dc8736c..0be3f89 100644 --- a/src/lib/core/envctl.c +++ b/src/lib/core/envctl.c @@ -100,13 +100,13 @@ void envctl_do_required(const struct EnvCtl *envctl, int verbose) {          int code = callback((const void *) item, (const void *) name);          if (code == STASIS_ENVCTL_RET_IGNORE || code == STASIS_ENVCTL_RET_SUCCESS) {              continue; -        } else if (code == STASIS_ENVCTL_RET_FAIL) { +        } +        if (code == STASIS_ENVCTL_RET_FAIL) {              fprintf(stderr, "\n%s must be set. Exiting.\n", name);              exit(1); -        } else { -            fprintf(stderr, "\nan unknown envctl callback code occurred: %d\n", code); -            exit(1);          } +        fprintf(stderr, "\nan unknown envctl callback code occurred: %d\n", code); +        exit(1);      }  } | 
