Skip to content

Commit 8548ddc

Browse files
committed
Fix inconsistencies and typos in the tree, take 9
This addresses more issues with code comments, variable names and unreferenced variables. Author: Alexander Lakhin Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com
1 parent 7550619 commit 8548ddc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+94
-121
lines changed

contrib/pg_standby/pg_standby.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ char *triggerPath; /* where to find the trigger file? */
5858
char *xlogFilePath; /* where we are going to restore to */
5959
char *nextWALFileName; /* the file we need to get from archive */
6060
char *restartWALFileName; /* the file from which we can restart restore */
61-
char *priorWALFileName; /* the file we need to get from archive */
6261
char WALFilePath[MAXPGPATH * 2]; /* the file path including archive */
6362
char restoreCommand[MAXPGPATH]; /* run this to restore */
6463
char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to get

contrib/pgcrypto/pgp-pgsql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ pgp_pub_decrypt_text(PG_FUNCTION_ARGS)
761761
*/
762762

763763
/*
764-
* Helper function for pgp_armor. Converts arrays of keys and values into
764+
* Helper function for pg_armor. Converts arrays of keys and values into
765765
* plain C arrays, and checks that they don't contain invalid characters.
766766
*/
767767
static int

contrib/pgcrypto/px.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ void *px_realloc(void *p, size_t s);
5050
void px_free(void *p);
5151
#endif
5252

53-
/* max len of 'type' parms */
54-
#define PX_MAX_NAMELEN 128
55-
5653
/* max salt returned */
5754
#define PX_MAX_SALT_LEN 128
5855

contrib/pgcrypto/sha1.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,6 @@ static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
5959
#define BCOUNT (ctxt->c.b64[0] / 8)
6060
#define W(n) (ctxt->m.b32[(n)])
6161

62-
#define PUTBYTE(x) \
63-
do { \
64-
ctxt->m.b8[(COUNT % 64)] = (x); \
65-
COUNT++; \
66-
COUNT %= 64; \
67-
ctxt->c.b64[0] += 8; \
68-
if (COUNT % 64 == 0) \
69-
sha1_step(ctxt); \
70-
} while (0)
71-
7262
#define PUTPAD(x) \
7363
do { \
7464
ctxt->m.b8[(COUNT % 64)] = (x); \

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2794,7 +2794,7 @@ estimate_path_cost_size(PlannerInfo *root,
27942794

27952795
/*
27962796
* Back into an estimate of the number of retrieved rows. Just in
2797-
* case this is nuts, clamp to at most nrow.
2797+
* case this is nuts, clamp to at most nrows.
27982798
*/
27992799
retrieved_rows = clamp_row_est(rows / fpinfo->local_conds_sel);
28002800
retrieved_rows = Min(retrieved_rows, nrows);

contrib/sepgsql/sepgsql.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ extern void sepgsql_avc_init(void);
271271
*/
272272
extern char *sepgsql_get_client_label(void);
273273
extern void sepgsql_init_client_label(void);
274-
extern char *sepgsql_get_label(Oid relOid, Oid objOid, int32 subId);
274+
extern char *sepgsql_get_label(Oid classId, Oid objectId, int32 subId);
275275

276276
extern void sepgsql_object_relabel(const ObjectAddress *object,
277277
const char *seclabel);

contrib/test_decoding/test_decoding.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
PG_MODULE_MAGIC;
2626

27-
/* These must be available to pg_dlsym() */
27+
/* These must be available to dlsym() */
2828
extern void _PG_init(void);
2929
extern void _PG_output_plugin_init(OutputPluginCallbacks *cb);
3030

doc/src/sgml/libpq.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5509,7 +5509,7 @@ int PQendcopy(PGconn *conn);
55095509
It should either be issued when the last string has been sent
55105510
to the server using <xref linkend="libpq-PQputline"/> or when the
55115511
last string has been received from the server using
5512-
<function>PGgetline</function>. It must be issued or the server
5512+
<function>PQgetline</function>. It must be issued or the server
55135513
will get <quote>out of sync</quote> with the client. Upon return
55145514
from this function, the server is ready to receive the next SQL
55155515
command. The return value is 0 on successful completion,

doc/src/sgml/ref/set_role.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ RESET ROLE
7070
effectively drops all the privileges assigned directly to the session user
7171
and to the other roles it is a member of, leaving only the privileges
7272
available to the named role. On the other hand, if the session user role
73-
has the <literal>NOINHERITS</literal> attribute, <command>SET ROLE</command> drops the
73+
has the <literal>NOINHERIT</literal> attribute, <command>SET ROLE</command> drops the
7474
privileges assigned directly to the session user and instead acquires the
7575
privileges available to the named role.
7676
</para>

doc/src/sgml/sslinfo.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ countryName (alias C)
185185
localityName (alias L)
186186
stateOrProvinceName (alias ST)
187187
organizationName (alias O)
188-
organizationUnitName (alias OU)
188+
organizationalUnitName (alias OU)
189189
title
190190
description
191191
initials

0 commit comments

Comments
 (0)