diff options
| author | Neil Conway <neilc@samurai.com> | 2006-01-11 08:43:13 +0000 |
|---|---|---|
| committer | Neil Conway <neilc@samurai.com> | 2006-01-11 08:43:13 +0000 |
| commit | fb627b76ccc4c7074e37b6b94155864f6cbd1b23 (patch) | |
| tree | a8e7b008b4f6c2a2188641937e5b984f40b60104 /src/interfaces | |
| parent | 762bcbdba2a2519b01b17b2c2b28f36e5ee9ea25 (diff) | |
| download | postgresql-fb627b76ccc4c7074e37b6b94155864f6cbd1b23.tar.gz | |
Cosmetic code cleanup: fix a bunch of places that used "return (expr);"
rather than "return expr;" -- the latter style is used in most of the
tree. I kept the parentheses when they were necessary or useful because
the return expression was complex.
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/libpq/fe-connect.c | 4 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-exec.c | 10 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-misc.c | 8 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-protocol2.c | 6 | ||||
| -rw-r--r-- | src/interfaces/libpq/fe-protocol3.c | 6 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 8204a0e1b7..69db8d830c 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.324 2005/11/22 18:17:32 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.325 2006/01/11 08:43:13 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -2936,7 +2936,7 @@ PQsetClientEncoding(PGconn *conn, const char *encoding) status = 0; /* everything is ok */ } PQclear(res); - return (status); + return status; } PGVerbosity diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index e355968e47..2b324916df 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.177 2005/11/22 18:17:32 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.178 2006/01/11 08:43:13 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -2271,7 +2271,7 @@ PQsetnonblocking(PGconn *conn, int arg) /* early out if the socket is already in the state requested */ if (barg == conn->nonblocking) - return (0); + return 0; /* * to guarantee constancy for flushing/query/result-polling behavior we @@ -2281,11 +2281,11 @@ PQsetnonblocking(PGconn *conn, int arg) */ /* if we are going from blocking to non-blocking flush here */ if (pqFlush(conn)) - return (-1); + return -1; conn->nonblocking = barg; - return (0); + return 0; } /* @@ -2295,7 +2295,7 @@ PQsetnonblocking(PGconn *conn, int arg) int PQisnonblocking(const PGconn *conn) { - return (pqIsnonblocking(conn)); + return pqIsnonblocking(conn); } /* try to force data out, really only useful for non-blocking users */ diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index d2caf667cd..c65cda28aa 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.123 2005/11/22 18:17:33 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.124 2006/01/11 08:43:13 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -1090,7 +1090,7 @@ pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time) int PQmblen(const char *s, int encoding) { - return (pg_encoding_mblen(encoding, s)); + return pg_encoding_mblen(encoding, s); } /* @@ -1100,7 +1100,7 @@ PQmblen(const char *s, int encoding) int PQdsplen(const char *s, int encoding) { - return (pg_encoding_dsplen(encoding, s)); + return pg_encoding_dsplen(encoding, s); } /* @@ -1115,7 +1115,7 @@ PQenv2encoding(void) str = getenv("PGCLIENTENCODING"); if (str && *str != '\0') encoding = pg_char_to_encoding(str); - return (encoding); + return encoding; } diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 22d1863993..42afacef30 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.20 2005/11/22 18:17:33 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol2.c,v 1.21 2006/01/11 08:43:13 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -1180,11 +1180,11 @@ pqEndcopy2(PGconn *conn) * and the flush fails */ if (pqFlush(conn) && pqIsnonblocking(conn)) - return (1); + return 1; /* non blocking connections may have to abort at this point. */ if (pqIsnonblocking(conn) && PQisBusy(conn)) - return (1); + return 1; /* Return to active duty */ conn->asyncStatus = PGASYNC_BUSY; diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 80780900db..259672ddc6 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol3.c,v 1.23 2005/11/22 18:17:33 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-protocol3.c,v 1.24 2006/01/11 08:43:13 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -1158,7 +1158,7 @@ pqEndcopy3(PGconn *conn) * and the flush fails */ if (pqFlush(conn) && pqIsnonblocking(conn)) - return (1); + return 1; /* Return to active duty */ conn->asyncStatus = PGASYNC_BUSY; @@ -1172,7 +1172,7 @@ pqEndcopy3(PGconn *conn) * with the CopyDone; are there corner cases where that doesn't happen?) */ if (pqIsnonblocking(conn) && PQisBusy(conn)) - return (1); + return 1; /* Wait for the completion response */ result = PQgetResult(conn); |
