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.
This commit is contained in:
Tom Lane 2010-10-27 15:26:24 -04:00
parent 869af50fcf
commit e6721c6e16
1 changed files with 11 additions and 11 deletions

View File

@ -1956,6 +1956,8 @@ canAcceptConnections(void)
/* /*
* ConnCreate -- create a local connection data structure * ConnCreate -- create a local connection data structure
*
* Returns NULL on failure, other than out-of-memory which is fatal.
*/ */
static Port * static Port *
ConnCreate(int serverFd) ConnCreate(int serverFd)
@ -1977,17 +1979,15 @@ ConnCreate(int serverFd)
ConnFree(port); ConnFree(port);
return NULL; return NULL;
} }
else
{ /*
/* * Precompute password salt values to use for this connection. It's
* Precompute password salt values to use for this connection. It's * slightly annoying to do this long in advance of knowing whether
* 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
* 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
* fork, not after. Else the postmaster's random sequence won't get * advanced, and all backends would end up using the same salt...
* advanced, and all backends would end up using the same salt... */
*/ RandomSalt(port->md5Salt);
RandomSalt(port->md5Salt);
}
/* /*
* Allocate GSSAPI specific state struct * Allocate GSSAPI specific state struct