Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0faf7d9

Browse files
Harmonize parameter names in contrib code.
Make sure that function declarations use names that exactly match thecorresponding names from function definitions in contrib code.Like other recent commits that cleaned up function parameter names, thiscommit was written with help from clang-tidy.Author: Peter Geoghegan <pg@bowt.ie>Discussion:https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
1 parent8fb4e00 commit0faf7d9

File tree

21 files changed

+59
-58
lines changed

21 files changed

+59
-58
lines changed

‎contrib/amcheck/verify_nbtree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static void bt_child_highkey_check(BtreeCheckState *state,
159159
Pageloaded_child,
160160
uint32target_level);
161161
staticvoidbt_downlink_missing_check(BtreeCheckState*state,boolrightsplit,
162-
BlockNumbertargetblock,Pagetarget);
162+
BlockNumberblkno,Pagepage);
163163
staticvoidbt_tuple_present_callback(Relationindex,ItemPointertid,
164164
Datum*values,bool*isnull,
165165
booltupleIsAlive,void*checkstate);

‎contrib/cube/cube.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int32cube_cmp_v0(NDBOX *a, NDBOX *b);
9696
boolcube_contains_v0(NDBOX*a,NDBOX*b);
9797
boolcube_overlap_v0(NDBOX*a,NDBOX*b);
9898
NDBOX*cube_union_v0(NDBOX*a,NDBOX*b);
99-
voidrt_cube_size(NDBOX*a,double*sz);
99+
voidrt_cube_size(NDBOX*a,double*size);
100100
NDBOX*g_cube_binary_union(NDBOX*r1,NDBOX*r2,int*sizep);
101101
boolg_cube_leaf_consistent(NDBOX*key,NDBOX*query,StrategyNumberstrategy);
102102
boolg_cube_internal_consistent(NDBOX*key,NDBOX*query,StrategyNumberstrategy);

‎contrib/dblink/dblink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static void dblink_security_check(PGconn *conn, remoteConn *rconn);
114114
staticvoiddblink_res_error(PGconn*conn,constchar*conname,PGresult*res,
115115
boolfail,constchar*fmt,...)pg_attribute_printf(5,6);
116116
staticchar*get_connect_string(constchar*servername);
117-
staticchar*escape_param_str(constchar*from);
117+
staticchar*escape_param_str(constchar*str);
118118
staticvoidvalidate_pkattnums(Relationrel,
119119
int2vector*pkattnums_arg,int32pknumatts_arg,
120120
int**pkattnums,int*pknumatts);

‎contrib/fuzzystrmatch/dmetaphone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
117117
#include<ctype.h>
118118

119119
/* prototype for the main function we got from the perl module */
120-
staticvoidDoubleMetaphone(char*,char**);
120+
staticvoidDoubleMetaphone(char*str,char**codes);
121121

122122
#ifndefDMETAPHONE_MAIN
123123

‎contrib/intarray/_int.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ ArrayType *new_intArrayType(int num);
114114
ArrayType*copy_intArrayType(ArrayType*a);
115115
ArrayType*resize_intArrayType(ArrayType*a,intnum);
116116
intinternal_size(int*a,intlen);
117-
ArrayType*_int_unique(ArrayType*a);
117+
ArrayType*_int_unique(ArrayType*r);
118118
int32intarray_match_first(ArrayType*a,int32elem);
119119
ArrayType*intarray_add_elem(ArrayType*a,int32elem);
120120
ArrayType*intarray_concat_arrays(ArrayType*a,ArrayType*b);

‎contrib/intarray/_int_selfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ PG_FUNCTION_INFO_V1(_int_contained_joinsel);
3434
PG_FUNCTION_INFO_V1(_int_matchsel);
3535

3636

37-
staticSelectivityint_query_opr_selec(ITEM*item,Datum*values,float4*freqs,
38-
intnmncelems,float4minfreq);
37+
staticSelectivityint_query_opr_selec(ITEM*item,Datum*mcelems,float4*mcefreqs,
38+
intnmcelems,float4minfreq);
3939
staticintcompare_val_int4(constvoid*a,constvoid*b);
4040

4141
/*

‎contrib/intarray/_int_tool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,14 @@ intarray_concat_arrays(ArrayType *a, ArrayType *b)
382382
}
383383

384384
ArrayType*
385-
int_to_intset(int32n)
385+
int_to_intset(int32elem)
386386
{
387387
ArrayType*result;
388388
int32*aa;
389389

390390
result=new_intArrayType(1);
391391
aa=ARRPTR(result);
392-
aa[0]=n;
392+
aa[0]=elem;
393393
returnresult;
394394
}
395395

‎contrib/ltree/ltree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ boolltree_execute(ITEM *curitem, void *checkval,
206206

207207
intltree_compare(constltree*a,constltree*b);
208208
boolinner_isparent(constltree*c,constltree*p);
209-
boolcompare_subnode(ltree_level*t,char*q,intlen,
209+
boolcompare_subnode(ltree_level*t,char*qn,intlen,
210210
int (*cmpptr) (constchar*,constchar*,size_t),boolanyend);
211211
ltree*lca_inner(ltree**a,intlen);
212212
intltree_strncasecmp(constchar*a,constchar*b,size_ts);

‎contrib/oid2name/oid2name.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ struct options
4848

4949
/* function prototypes */
5050
staticvoidhelp(constchar*progname);
51-
voidget_opts(int,char**,structoptions*);
51+
voidget_opts(intargc,char**argv,structoptions*my_opts);
5252
voidadd_one_elt(char*eltname,eary*eary);
5353
char*get_comma_elts(eary*eary);
54-
PGconn*sql_conn(structoptions*);
55-
intsql_exec(PGconn*,constchar*sql,boolquiet);
56-
voidsql_exec_dumpalldbs(PGconn*,structoptions*);
57-
voidsql_exec_dumpalltables(PGconn*,structoptions*);
58-
voidsql_exec_searchtables(PGconn*,structoptions*);
59-
voidsql_exec_dumpalltbspc(PGconn*,structoptions*);
54+
PGconn*sql_conn(structoptions*my_opts);
55+
intsql_exec(PGconn*conn,constchar*todo,boolquiet);
56+
voidsql_exec_dumpalldbs(PGconn*conn,structoptions*opts);
57+
voidsql_exec_dumpalltables(PGconn*conn,structoptions*opts);
58+
voidsql_exec_searchtables(PGconn*conn,structoptions*opts);
59+
voidsql_exec_dumpalltbspc(PGconn*conn,structoptions*opts);
6060

6161
/* function to parse command line options and check for some usage errors. */
6262
void

‎contrib/pgcrypto/mbuf.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,33 @@ intmbuf_avail(MBuf *mbuf);
8282
intmbuf_size(MBuf*mbuf);
8383
intmbuf_grab(MBuf*mbuf,intlen,uint8**data_p);
8484
intmbuf_steal_data(MBuf*mbuf,uint8**data_p);
85-
intmbuf_append(MBuf*dst,constuint8*buf,intcnt);
85+
intmbuf_append(MBuf*dst,constuint8*buf,intlen);
8686
intmbuf_free(MBuf*mbuf);
8787

8888
/*
8989
* Push filter
9090
*/
91-
intpushf_create(PushFilter**res,constPushFilterOps*ops,void*init_arg,
92-
PushFilter*next);
91+
intpushf_create(PushFilter**mp_p,constPushFilterOps*op,
92+
void*init_arg,PushFilter*next);
9393
intpushf_write(PushFilter*mp,constuint8*data,intlen);
9494
voidpushf_free_all(PushFilter*mp);
9595
voidpushf_free(PushFilter*mp);
9696
intpushf_flush(PushFilter*mp);
9797

98-
intpushf_create_mbuf_writer(PushFilter**mp_p,MBuf*mbuf);
98+
intpushf_create_mbuf_writer(PushFilter**res,MBuf*dst);
9999

100100
/*
101101
* Pull filter
102102
*/
103-
intpullf_create(PullFilter**res,constPullFilterOps*ops,
103+
intpullf_create(PullFilter**pf_p,constPullFilterOps*op,
104104
void*init_arg,PullFilter*src);
105-
intpullf_read(PullFilter*mp,intlen,uint8**data_p);
106-
intpullf_read_max(PullFilter*mp,intlen,
105+
intpullf_read(PullFilter*pf,intlen,uint8**data_p);
106+
intpullf_read_max(PullFilter*pf,intlen,
107107
uint8**data_p,uint8*tmpbuf);
108-
voidpullf_free(PullFilter*mp);
108+
voidpullf_free(PullFilter*pf);
109109
intpullf_read_fixed(PullFilter*src,intlen,uint8*dst);
110110

111-
intpullf_create_mbuf_reader(PullFilter**pf_p,MBuf*mbuf);
111+
intpullf_create_mbuf_reader(PullFilter**mp_p,MBuf*src);
112112

113113
#defineGETBYTE(pf,dst) \
114114
do { \

‎contrib/pgcrypto/pgcrypto.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ PG_MODULE_MAGIC;
4545
/* private stuff */
4646

4747
typedefint (*PFN) (constchar*name,void**res);
48-
staticvoid*find_provider(text*name,PFNpf,constchar*desc,intsilent);
48+
staticvoid*find_provider(text*name,PFNprovider_lookup,constchar*desc,
49+
intsilent);
4950

5051
/* SQL function: hash(bytea, text) returns bytea */
5152
PG_FUNCTION_INFO_V1(pg_digest);

‎contrib/pgcrypto/pgp.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -236,17 +236,17 @@ struct PGP_PubKey
236236
intcan_encrypt;
237237
};
238238

239-
intpgp_init(PGP_Context**ctx);
239+
intpgp_init(PGP_Context**ctx_p);
240240
intpgp_encrypt(PGP_Context*ctx,MBuf*src,MBuf*dst);
241-
intpgp_decrypt(PGP_Context*ctx,MBuf*src,MBuf*dst);
241+
intpgp_decrypt(PGP_Context*ctx,MBuf*msrc,MBuf*mdst);
242242
intpgp_free(PGP_Context*ctx);
243243

244244
intpgp_get_digest_code(constchar*name);
245245
intpgp_get_cipher_code(constchar*name);
246246
constchar*pgp_get_digest_name(intcode);
247247

248248
intpgp_set_cipher_algo(PGP_Context*ctx,constchar*name);
249-
intpgp_set_s2k_mode(PGP_Context*ctx,inttype);
249+
intpgp_set_s2k_mode(PGP_Context*ctx,intmode);
250250
intpgp_set_s2k_count(PGP_Context*ctx,intcount);
251251
intpgp_set_s2k_cipher_algo(PGP_Context*ctx,constchar*name);
252252
intpgp_set_s2k_digest_algo(PGP_Context*ctx,constchar*name);
@@ -259,22 +259,22 @@ intpgp_set_text_mode(PGP_Context *ctx, int mode);
259259
intpgp_set_unicode_mode(PGP_Context*ctx,intmode);
260260
intpgp_get_unicode_mode(PGP_Context*ctx);
261261

262-
intpgp_set_symkey(PGP_Context*ctx,constuint8*key,intklen);
262+
intpgp_set_symkey(PGP_Context*ctx,constuint8*key,intlen);
263263
intpgp_set_pubkey(PGP_Context*ctx,MBuf*keypkt,
264-
constuint8*key,intklen,intpubtype);
264+
constuint8*key,intkey_len,intpubtype);
265265

266266
intpgp_get_keyid(MBuf*pgp_data,char*dst);
267267

268268
/* internal functions */
269269

270-
intpgp_load_digest(intc,PX_MD**res);
271-
intpgp_load_cipher(intc,PX_Cipher**res);
272-
intpgp_get_cipher_key_size(intc);
273-
intpgp_get_cipher_block_size(intc);
270+
intpgp_load_digest(intcode,PX_MD**res);
271+
intpgp_load_cipher(intcode,PX_Cipher**res);
272+
intpgp_get_cipher_key_size(intcode);
273+
intpgp_get_cipher_block_size(intcode);
274274

275275
intpgp_s2k_fill(PGP_S2K*s2k,intmode,intdigest_algo,intcount);
276276
intpgp_s2k_read(PullFilter*src,PGP_S2K*s2k);
277-
intpgp_s2k_process(PGP_S2K*s2k,intcipher,constuint8*key,intklen);
277+
intpgp_s2k_process(PGP_S2K*s2k,intcipher,constuint8*key,intkey_len);
278278

279279
typedefstructPGP_CFBPGP_CFB;
280280
intpgp_cfb_create(PGP_CFB**ctx_p,intalgo,
@@ -316,11 +316,11 @@ intpgp_mpi_write(PushFilter *dst, PGP_MPI *n);
316316
intpgp_mpi_hash(PX_MD*md,PGP_MPI*n);
317317
unsignedpgp_mpi_cksum(unsignedcksum,PGP_MPI*n);
318318

319-
intpgp_elgamal_encrypt(PGP_PubKey*pk,PGP_MPI*m,
320-
PGP_MPI**c1,PGP_MPI**c2);
321-
intpgp_elgamal_decrypt(PGP_PubKey*pk,PGP_MPI*c1,PGP_MPI*c2,
322-
PGP_MPI**m);
323-
intpgp_rsa_encrypt(PGP_PubKey*pk,PGP_MPI*m,PGP_MPI**c);
324-
intpgp_rsa_decrypt(PGP_PubKey*pk,PGP_MPI*c,PGP_MPI**m);
319+
intpgp_elgamal_encrypt(PGP_PubKey*pk,PGP_MPI*_m,
320+
PGP_MPI**c1_p,PGP_MPI**c2_p);
321+
intpgp_elgamal_decrypt(PGP_PubKey*pk,PGP_MPI*_c1,PGP_MPI*_c2,
322+
PGP_MPI**msg_p);
323+
intpgp_rsa_encrypt(PGP_PubKey*pk,PGP_MPI*_m,PGP_MPI**c_p);
324+
intpgp_rsa_decrypt(PGP_PubKey*pk,PGP_MPI*_c,PGP_MPI**m_p);
325325

326326
externstructPullFilterOpspgp_decrypt_filter;

‎contrib/pgcrypto/px-crypt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
/*
4949
* main interface
5050
*/
51-
char*px_crypt(constchar*psw,constchar*salt,char*buf,unsignedbuflen);
52-
intpx_gen_salt(constchar*salt_type,char*dst,introunds);
51+
char*px_crypt(constchar*psw,constchar*salt,char*buf,unsignedlen);
52+
intpx_gen_salt(constchar*salt_type,char*buf,introunds);
5353

5454
/*
5555
* internal functions
@@ -77,6 +77,6 @@ char *px_crypt_des(const char *key, const char *setting);
7777

7878
/* crypt-md5.c */
7979
char*px_crypt_md5(constchar*pw,constchar*salt,
80-
char*dst,unsigneddstlen);
80+
char*passwd,unsigneddstlen);
8181

8282
#endif/* _PX_CRYPT_H */

‎contrib/pgcrypto/px.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ intpx_find_combo(const char *name, PX_Combo **res);
176176
voidpx_THROW_ERROR(interr)pg_attribute_noreturn();
177177
constchar*px_strerror(interr);
178178

179-
constchar*px_resolve_alias(constPX_Alias*aliases,constchar*name);
179+
constchar*px_resolve_alias(constPX_Alias*list,constchar*name);
180180

181181
voidpx_set_debug_handler(void (*handler) (constchar*));
182182

‎contrib/postgres_fdw/deparse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static void deparseReturningList(StringInfo buf, RangeTblEntry *rte,
149149
staticvoiddeparseColumnRef(StringInfobuf,intvarno,intvarattno,
150150
RangeTblEntry*rte,boolqualify_col);
151151
staticvoiddeparseRelation(StringInfobuf,Relationrel);
152-
staticvoiddeparseExpr(Expr*expr,deparse_expr_cxt*context);
152+
staticvoiddeparseExpr(Expr*node,deparse_expr_cxt*context);
153153
staticvoiddeparseVar(Var*node,deparse_expr_cxt*context);
154154
staticvoiddeparseConst(Const*node,deparse_expr_cxt*context,intshowtype);
155155
staticvoiddeparseParam(Param*node,deparse_expr_cxt*context);

‎contrib/postgres_fdw/postgres_fdw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static PgFdwModifyState *create_foreign_modify(EState *estate,
457457
Plan*subplan,
458458
char*query,
459459
List*target_attrs,
460-
intlen,
460+
intvalues_end,
461461
boolhas_returning,
462462
List*retrieved_attrs);
463463
staticTupleTableSlot**execute_foreign_modify(EState*estate,

‎contrib/postgres_fdw/postgres_fdw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ extern EquivalenceMember *find_em_for_rel_target(PlannerInfo *root,
226226
RelOptInfo*rel);
227227
externList*build_tlist_to_deparse(RelOptInfo*foreignrel);
228228
externvoiddeparseSelectStmtForRel(StringInfobuf,PlannerInfo*root,
229-
RelOptInfo*foreignrel,List*tlist,
229+
RelOptInfo*rel,List*tlist,
230230
List*remote_conds,List*pathkeys,
231231
boolhas_final_sort,boolhas_limit,
232232
boolis_subquery,

‎contrib/seg/seg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ PG_FUNCTION_INFO_V1(seg_different);
9292
/*
9393
** Auxiliary functions
9494
*/
95-
staticintrestore(char*s,floatval,intn);
95+
staticintrestore(char*result,floatval,intn);
9696

9797

9898
/*****************************************************************************

‎contrib/seg/segdata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ typedef struct SEG
1212
}SEG;
1313

1414
/* in seg.c */
15-
externintsignificant_digits(constchar*str);
15+
externintsignificant_digits(constchar*s);
1616

1717
/* in segscan.l */
1818
externintseg_yylex(void);

‎contrib/tablefunc/tablefunc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ static Tuplestorestate *get_crosstab_tuplestore(char *sql,
5151
HTAB*crosstab_hash,
5252
TupleDesctupdesc,
5353
boolrandomAccess);
54-
staticvoidvalidateConnectbyTupleDesc(TupleDesctupdesc,boolshow_branch,boolshow_serial);
55-
staticboolcompatCrosstabTupleDescs(TupleDesctupdesc1,TupleDesctupdesc2);
56-
staticvoidcompatConnectbyTupleDescs(TupleDesctupdesc1,TupleDesctupdesc2);
54+
staticvoidvalidateConnectbyTupleDesc(TupleDesctd,boolshow_branch,boolshow_serial);
55+
staticboolcompatCrosstabTupleDescs(TupleDescret_tupdesc,TupleDescsql_tupdesc);
56+
staticvoidcompatConnectbyTupleDescs(TupleDescret_tupdesc,TupleDescsql_tupdesc);
5757
staticvoidget_normal_pair(float8*x1,float8*x2);
5858
staticTuplestorestate*connectby(char*relname,
5959
char*key_fld,

‎contrib/test_decoding/test_decoding.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static void pg_output_begin(LogicalDecodingContext *ctx,
6060
staticvoidpg_decode_commit_txn(LogicalDecodingContext*ctx,
6161
ReorderBufferTXN*txn,XLogRecPtrcommit_lsn);
6262
staticvoidpg_decode_change(LogicalDecodingContext*ctx,
63-
ReorderBufferTXN*txn,Relationrel,
63+
ReorderBufferTXN*txn,Relationrelation,
6464
ReorderBufferChange*change);
6565
staticvoidpg_decode_truncate(LogicalDecodingContext*ctx,
6666
ReorderBufferTXN*txn,
@@ -69,7 +69,7 @@ static void pg_decode_truncate(LogicalDecodingContext *ctx,
6969
staticboolpg_decode_filter(LogicalDecodingContext*ctx,
7070
RepOriginIdorigin_id);
7171
staticvoidpg_decode_message(LogicalDecodingContext*ctx,
72-
ReorderBufferTXN*txn,XLogRecPtrmessage_lsn,
72+
ReorderBufferTXN*txn,XLogRecPtrlsn,
7373
booltransactional,constchar*prefix,
7474
Sizesz,constchar*message);
7575
staticboolpg_decode_filter_prepare(LogicalDecodingContext*ctx,
@@ -109,7 +109,7 @@ static void pg_decode_stream_change(LogicalDecodingContext *ctx,
109109
Relationrelation,
110110
ReorderBufferChange*change);
111111
staticvoidpg_decode_stream_message(LogicalDecodingContext*ctx,
112-
ReorderBufferTXN*txn,XLogRecPtrmessage_lsn,
112+
ReorderBufferTXN*txn,XLogRecPtrlsn,
113113
booltransactional,constchar*prefix,
114114
Sizesz,constchar*message);
115115
staticvoidpg_decode_stream_truncate(LogicalDecodingContext*ctx,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp