Commit 4ba96d1b authored by Michael Paquier's avatar Michael Paquier

Improve format of code and some error messages in pg_checksums

This makes the code more consistent with the surroundings.

Author: Fabrízio de Royes Mello
Discussion: https://postgr.es/m/CAFcNs+pXb_35r5feMU3-dWsWxXU=Yjq+spUsthFyGFbT0QcaKg@mail.gmail.com
parent fb50d3f0
...@@ -435,16 +435,18 @@ main(int argc, char *argv[]) ...@@ -435,16 +435,18 @@ main(int argc, char *argv[])
fprintf(stderr, _("%s: data checksums are not enabled in cluster\n"), progname); fprintf(stderr, _("%s: data checksums are not enabled in cluster\n"), progname);
exit(1); exit(1);
} }
if (ControlFile->data_checksum_version == 0 && if (ControlFile->data_checksum_version == 0 &&
mode == PG_MODE_DISABLE) mode == PG_MODE_DISABLE)
{ {
fprintf(stderr, _("%s: data checksums are already disabled in cluster.\n"), progname); fprintf(stderr, _("%s: data checksums are already disabled in cluster\n"), progname);
exit(1); exit(1);
} }
if (ControlFile->data_checksum_version > 0 && if (ControlFile->data_checksum_version > 0 &&
mode == PG_MODE_ENABLE) mode == PG_MODE_ENABLE)
{ {
fprintf(stderr, _("%s: data checksums are already enabled in cluster.\n"), progname); fprintf(stderr, _("%s: data checksums are already enabled in cluster\n"), progname);
exit(1); exit(1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment