Skip to content

Commit 66bde49

Browse files
committed
Fix inconsistencies and typos in the tree, take 10
This addresses some issues with unnecessary code comments, fixes various typos in docs and comments, and removes some orphaned structures and definitions. Author: Alexander Lakhin Discussion: https://postgr.es/m/[email protected]
1 parent 2d7d67c commit 66bde49

Some content is hidden

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

74 files changed

+93
-141
lines changed

contrib/fuzzystrmatch/dmetaphone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
191191
(v = (t*)repalloc((v),((n)*sizeof(t))))
192192

193193
/*
194-
* Don't do pfree - it seems to cause a segv sometimes - which might have just
194+
* Don't do pfree - it seems to cause a SIGSEGV sometimes - which might have just
195195
* been caused by reloading the module in development.
196196
* So we rely on context cleanup - Tom Lane says pfree shouldn't be necessary
197197
* in a case like this.

contrib/ltree/ltxtquery_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pushquery(QPRS_STATE *state, int32 type, int32 val, int32 distance, int32 lenval
166166
}
167167

168168
/*
169-
* This function is used for query_txt parsing
169+
* This function is used for query text parsing
170170
*/
171171
static void
172172
pushval_asis(QPRS_STATE *state, int type, char *strval, int lenval, uint16 flag)

contrib/pgcrypto/internal.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,6 @@
3939
#include "blf.h"
4040
#include "rijndael.h"
4141

42-
/*
43-
* System reseeds should be separated at least this much.
44-
*/
45-
#define SYSTEM_RESEED_MIN (20*60) /* 20 min */
46-
/*
47-
* How often to roll dice.
48-
*/
49-
#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */
50-
/*
51-
* The chance is x/256 that the reseed happens.
52-
*/
53-
#define SYSTEM_RESEED_CHANCE (4) /* 256/4 * 10min ~ 10h */
54-
55-
/*
56-
* If this much time has passed, force reseed.
57-
*/
58-
#define SYSTEM_RESEED_MAX (12*60*60) /* 12h */
59-
60-
6142
#ifndef MD5_DIGEST_LENGTH
6243
#define MD5_DIGEST_LENGTH 16
6344
#endif

contrib/pgcrypto/pgp-decrypt.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static struct PullFilterOps mdc_filter = {
423423
/*
424424
* Combined Pkt reader and MDC hasher.
425425
*
426-
* For the case of SYMENCRYPTED_MDC packet, where
426+
* For the case of SYMENCRYPTED_DATA_MDC packet, where
427427
* the data part has 'context length', which means
428428
* that data packet ends 22 bytes before end of parent
429429
* packet, which is silly.
@@ -894,7 +894,10 @@ process_data_packets(PGP_Context *ctx, MBuf *dst, PullFilter *src,
894894
break;
895895
}
896896

897-
/* context length inside SYMENC_MDC needs special handling */
897+
/*
898+
* Context length inside SYMENCRYPTED_DATA_MDC packet needs special
899+
* handling.
900+
*/
898901
if (need_mdc && res == PKT_CONTEXT)
899902
res = pullf_create(&pkt, &mdcbuf_filter, ctx, src);
900903
else

contrib/pgcrypto/pgp-encrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst)
618618
goto out;
619619

620620
/*
621-
* initialize symkey
621+
* initialize sym_key
622622
*/
623623
if (ctx->sym_key)
624624
{

contrib/pgcrypto/pgp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ int pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int klen);
279279

280280
typedef struct PGP_CFB PGP_CFB;
281281
int pgp_cfb_create(PGP_CFB **ctx_p, int algo,
282-
const uint8 *key, int key_len, int recync, uint8 *iv);
282+
const uint8 *key, int key_len, int resync, uint8 *iv);
283283
void pgp_cfb_free(PGP_CFB *ctx);
284284
int pgp_cfb_encrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
285285
int pgp_cfb_decrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);

contrib/sepgsql/label.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ sepgsql_mcstrans_out(PG_FUNCTION_ARGS)
653653
}
654654

655655
/*
656-
* quote_object_names
656+
* quote_object_name
657657
*
658658
* It tries to quote the supplied identifiers
659659
*/

contrib/sepgsql/selinux.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,8 @@ sepgsql_getenforce(void)
657657
/*
658658
* sepgsql_audit_log
659659
*
660-
* It generates a security audit record. In the default, it writes out
661-
* audit records into standard PG's logfile. It also allows to set up
662-
* external audit log receiver, such as auditd in Linux, using the
663-
* sepgsql_audit_hook.
660+
* It generates a security audit record. It writes out audit records
661+
* into standard PG's logfile.
664662
*
665663
* SELinux can control what should be audited and should not using
666664
* "auditdeny" and "auditallow" rules in the security policy. In the

contrib/spi/refint.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CREATE TABLE A (
55
);
66
CREATE UNIQUE INDEX AI ON A (ID);
77

8-
--Columns REFB of table B and REFC of C are foreign keys referenting ID of A:
8+
--Columns REFB of table B and REFC of C are foreign keys referencing ID of A:
99

1010
CREATE TABLE B (
1111
REFB int4

doc/src/sgml/ecpg.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5011,7 +5011,7 @@ struct
50115011

50125012
<para>
50135013
The fields <structfield>sqlcaid</structfield>,
5014-
<structfield>sqlcabc</structfield>,
5014+
<structfield>sqlabc</structfield>,
50155015
<structfield>sqlerrp</structfield>, and the remaining elements of
50165016
<structfield>sqlerrd</structfield> and
50175017
<structfield>sqlwarn</structfield> currently contain no useful

0 commit comments

Comments
 (0)