From 84a0445c4d48f2254cd3a248b5e4bda8c64c0190 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 15 Jul 2007 22:54:21 +0000 Subject: [PATCH] Change a couple of exit(0) to return 0 to suppress complaints from not-too-bright compilers. Per buildfarm results. --- contrib/oid2name/oid2name.c | 4 ++-- contrib/pg_standby/pg_standby.c | 27 +++++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c index 79df423b55..691b2f28d1 100644 --- a/contrib/oid2name/oid2name.c +++ b/contrib/oid2name/oid2name.c @@ -4,7 +4,7 @@ * * Originally by * B. Palmer, bpalmer@crimelabs.net 1-17-2001 - * $PostgreSQL: pgsql/contrib/oid2name/oid2name.c,v 1.30 2006/10/19 20:38:48 tgl Exp $ + * $PostgreSQL: pgsql/contrib/oid2name/oid2name.c,v 1.31 2007/07/15 22:54:20 tgl Exp $ */ #include "postgres_fe.h" @@ -575,5 +575,5 @@ main(int argc, char **argv) sql_exec_dumpalldbs(pgconn, my_opts); PQfinish(pgconn); - exit(0); + return 0; } diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c index bb885384c3..7eb4a51ba4 100644 --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -605,18 +605,17 @@ main(int argc, char **argv) */ if (triggered) exit(1); /* Normal exit, with non-zero */ - else - { - /* - * Once we have restored this file successfully we - * can remove some prior WAL files. - * If this restore fails we musn't remove any - * file because some of them will be requested again - * immediately after the failed restore, or when - * we restart recovery. - */ - if (RestoreWALFileForRecovery()) - CustomizableCleanupPriorWALFiles(); - exit(0); - } + + /* + * Once we have restored this file successfully we + * can remove some prior WAL files. + * If this restore fails we musn't remove any + * file because some of them will be requested again + * immediately after the failed restore, or when + * we restart recovery. + */ + if (RestoreWALFileForRecovery()) + CustomizableCleanupPriorWALFiles(); + + return 0; } -- 2.49.0