diff options
author | Andres Freund <andres@anarazel.de> | 2021-08-09 08:26:59 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2021-08-09 08:28:53 -0700 |
commit | e12694523e7e4482a052236f12d3d8b58be9a22c (patch) | |
tree | 00686386c7cb4e75c800fbeef68ddc7345faaa0f /src | |
parent | 0e6aa8747d439bb7f08f95e358f0509c50396785 (diff) | |
download | postgresql-e12694523e7e4482a052236f12d3d8b58be9a22c.tar.gz postgresql-e12694523e7e4482a052236f12d3d8b58be9a22c.zip |
Fix bogus assertion in BootstrapModeMain().
The assertion was always true, as written, thanks to me "simplifying" it
before commit.
Per coverity and Tom Lane.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 3416802811b..48615c0ebcb 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -215,9 +215,9 @@ BootstrapModeMain(int argc, char *argv[], bool check_only) InitializeGUCOptions(); /* an initial --boot or --check should be present */ - Assert(argc == 1 - || strcmp(argv[1], "--boot") != 0 - || strcmp(argv[1], "--check") != 0); + Assert(argc > 1 + && (strcmp(argv[1], "--boot") == 0 + || strcmp(argv[1], "--check") == 0)); argv++; argc--; |