mirror of
https://github.com/postgres/postgres.git
synced 2025-12-07 12:02:30 +03:00
Pgindent run before 9.1 beta2.
This commit is contained in:
@@ -61,7 +61,7 @@ extern char *optarg;
|
||||
#define BADARG (int)':'
|
||||
#define EMSG ""
|
||||
|
||||
int getopt(int nargc, char *const * nargv, const char * ostr);
|
||||
int getopt(int nargc, char *const * nargv, const char *ostr);
|
||||
|
||||
/*
|
||||
* getopt
|
||||
@@ -74,7 +74,7 @@ int getopt(int nargc, char *const * nargv, const char * ostr);
|
||||
* returning -1.)
|
||||
*/
|
||||
int
|
||||
getopt(int nargc, char *const * nargv, const char * ostr)
|
||||
getopt(int nargc, char *const * nargv, const char *ostr)
|
||||
{
|
||||
static char *place = EMSG; /* option letter processing */
|
||||
char *oli; /* option letter list index */
|
||||
|
||||
@@ -69,7 +69,7 @@ getpeereid(int sock, uid_t *uid, gid_t *gid)
|
||||
*gid = ucred_getegid(ucred);
|
||||
ucred_free(ucred);
|
||||
|
||||
if (*uid == (uid_t)(-1) || *gid == (gid_t)(-1))
|
||||
if (*uid == (uid_t) (-1) || *gid == (gid_t) (-1))
|
||||
return -1;
|
||||
return 0;
|
||||
#else
|
||||
|
||||
@@ -81,8 +81,8 @@ inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
|
||||
* We need to cover both the address family constants used by the PG inet
|
||||
* type (PGSQL_AF_INET and PGSQL_AF_INET6) and those used by the system
|
||||
* libraries (AF_INET and AF_INET6). We can safely assume PGSQL_AF_INET
|
||||
* == AF_INET, but the INET6 constants are very likely to be different.
|
||||
* If AF_INET6 isn't defined, silently ignore it.
|
||||
* == AF_INET, but the INET6 constants are very likely to be different. If
|
||||
* AF_INET6 isn't defined, silently ignore it.
|
||||
*/
|
||||
switch (af)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ pg_set_noblock(pgsocket sock)
|
||||
#if !defined(WIN32)
|
||||
return (fcntl(sock, F_SETFL, O_NONBLOCK) != -1);
|
||||
#else
|
||||
unsigned long ioctlsocket_ret = 1;
|
||||
unsigned long ioctlsocket_ret = 1;
|
||||
|
||||
/* Returns non-0 on failure, while fcntl() returns -1 on failure */
|
||||
return (ioctlsocket(sock, FIONBIO, &ioctlsocket_ret) == 0);
|
||||
@@ -42,7 +42,7 @@ pg_set_block(pgsocket sock)
|
||||
return false;
|
||||
return true;
|
||||
#else
|
||||
unsigned long ioctlsocket_ret = 0;
|
||||
unsigned long ioctlsocket_ret = 0;
|
||||
|
||||
/* Returns non-0 on failure, while fcntl() returns -1 on failure */
|
||||
return (ioctlsocket(sock, FIONBIO, &ioctlsocket_ret) == 0);
|
||||
|
||||
Reference in New Issue
Block a user