aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-10-27 15:26:24 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2010-10-27 15:26:24 -0400
commite6721c6e1617a0fc8b4bce8eacba8b5a381f1f21 (patch)
tree17f448a42a0a56f34d3aa1c549ab7b65614b3e13
parent869af50fcfdd4448b2dc637d905f1afda689741d (diff)
downloadpostgresql-e6721c6e1617a0fc8b4bce8eacba8b5a381f1f21.tar.gz
postgresql-e6721c6e1617a0fc8b4bce8eacba8b5a381f1f21.zip
Previous patch had no detectable virtue other than being a one-liner.
Try to make the code look self-consistent again, so it doesn't confuse future developers.
-rw-r--r--src/backend/postmaster/postmaster.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index f24a091ef8b..0fb11833fa8 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1956,6 +1956,8 @@ canAcceptConnections(void)
/*
* ConnCreate -- create a local connection data structure
+ *
+ * Returns NULL on failure, other than out-of-memory which is fatal.
*/
static Port *
ConnCreate(int serverFd)
@@ -1977,17 +1979,15 @@ ConnCreate(int serverFd)
ConnFree(port);
return NULL;
}
- else
- {
- /*
- * Precompute password salt values to use for this connection. It's
- * slightly annoying to do this long in advance of knowing whether
- * we'll need 'em or not, but we must do the random() calls before we
- * fork, not after. Else the postmaster's random sequence won't get
- * advanced, and all backends would end up using the same salt...
- */
- RandomSalt(port->md5Salt);
- }
+
+ /*
+ * Precompute password salt values to use for this connection. It's
+ * slightly annoying to do this long in advance of knowing whether
+ * we'll need 'em or not, but we must do the random() calls before we
+ * fork, not after. Else the postmaster's random sequence won't get
+ * advanced, and all backends would end up using the same salt...
+ */
+ RandomSalt(port->md5Salt);
/*
* Allocate GSSAPI specific state struct