diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2012-06-25 21:25:26 +0300 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2012-06-25 21:30:12 +0300 |
| commit | eeece9e60984e76e5a41c1e2fa9efc5a1761e560 (patch) | |
| tree | f1dfac89e34d678629b3f56ace2bb215b33f4a94 /src/backend/replication | |
| parent | c7d47abd04dc1322fd545370cfeb743680df0e3a (diff) | |
Unify calling conventions for postgres/postmaster sub-main functions
There was a wild mix of calling conventions: Some were declared to
return void and didn't return, some returned an int exit code, some
claimed to return an exit code, which the callers checked, but
actually never returned, and so on.
Now all of these functions are declared to return void and decorated
with attribute noreturn and don't return. That's easiest, and most
code already worked that way.
Diffstat (limited to 'src/backend/replication')
| -rw-r--r-- | src/backend/replication/walsender.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index d5cb778f7e6..616d4e73e3b 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -120,7 +120,7 @@ static void WalSndLastCycleHandler(SIGNAL_ARGS); /* Prototypes for private functions */ static bool HandleReplicationCommand(const char *cmd_string); -static int WalSndLoop(void); +static void WalSndLoop(void) __attribute__((noreturn)); static void InitWalSnd(void); static void WalSndHandshake(void); static void WalSndKill(int code, Datum arg); @@ -135,7 +135,7 @@ static void WalSndKeepalive(char *msgbuf); /* Main entry point for walsender process */ -int +void WalSenderMain(void) { MemoryContext walsnd_context; @@ -192,7 +192,7 @@ WalSenderMain(void) SyncRepInitConfig(); /* Main loop of walsender */ - return WalSndLoop(); + WalSndLoop(); } /* @@ -706,7 +706,7 @@ ProcessStandbyHSFeedbackMessage(void) } /* Main loop of walsender process */ -static int +static void WalSndLoop(void) { char *output_message; @@ -882,7 +882,7 @@ WalSndLoop(void) whereToSendOutput = DestNone; proc_exit(0); - return 1; /* keep the compiler quiet */ + abort(); /* keep the compiler quiet */ } /* Initialize a per-walsender data structure for this walsender process */ |
