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

Commitf83bf38

Browse files
committed
Preliminary work for pgindent run.
Update typedefs.list from current buildfarm results. Adjust pgindent'stypedef blacklist to block some more unfortunate typedef names that havesnuck in since last time. Manually tweak a few places where I didn'tlike the initial results of pgindent'ing.
1 parenta0854f1 commitf83bf38

File tree

6 files changed

+118
-22
lines changed

6 files changed

+118
-22
lines changed

‎contrib/pg_trgm/trgm_op.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ typedef struct
4848

4949
/* Trigram bound type */
5050
typedefuint8TrgmBound;
51-
#defineTRGM_BOUND_LEFT(0x01)/* trigram is left bound of word */
52-
#defineTRGM_BOUND_RIGHT(0x02)/* trigram is right bound of word */
51+
#defineTRGM_BOUND_LEFT0x01/* trigram is left bound of word */
52+
#defineTRGM_BOUND_RIGHT0x02/* trigram is right bound of word */
5353

5454
/* Word similarity flags */
55-
#defineWORD_SIMILARITY_CHECK_ONLY(0x01)/*if set thenonly check existence
56-
* of similar search pattern in text */
57-
#defineWORD_SIMILARITY_STRICT(0x02)/* force bounds of extent to match
58-
* word bounds */
55+
#defineWORD_SIMILARITY_CHECK_ONLY0x01/* only check existence of similar
56+
* search pattern in text */
57+
#defineWORD_SIMILARITY_STRICT0x02/* force bounds of extent to match
58+
* word bounds */
5959

6060
/*
6161
* Module load callback

‎src/backend/libpq/be-secure-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ run_ssl_passphrase_command(const char *prompt, bool is_server_start, char *buf,
114114

115115
/* strip trailing newline */
116116
len=strlen(buf);
117-
if (buf[len-1]=='\n')
118-
buf[len---1]='\0';
117+
if (len>0&&buf[len-1]=='\n')
118+
buf[--len]='\0';
119119

120120
error:
121121
pfree(command.data);

‎src/include/storage/reinit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020

2121
externvoidResetUnloggedRelations(intop);
22-
externboolparse_filename_for_nontemp_relation(
23-
constchar*name,int*oidchars,ForkNumber*fork);
22+
externboolparse_filename_for_nontemp_relation(constchar*name,
23+
int*oidchars,ForkNumber*fork);
2424

2525
#defineUNLOGGED_RELATION_CLEANUP0x0001
2626
#defineUNLOGGED_RELATION_INIT0x0002

‎src/port/pg_crc32c_armv8.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,20 @@ pg_comp_crc32c_armv8(pg_crc32c crc, const void *data, size_t len)
2929
* significantly faster. Process leading bytes so that the loop below
3030
* starts with a pointer aligned to eight bytes.
3131
*/
32-
if (!PointerIsAligned(p,uint16)&&p+1 <=pend)
32+
if (!PointerIsAligned(p,uint16)&&
33+
p+1 <=pend)
3334
{
3435
crc=__crc32cb(crc,*p);
3536
p+=1;
3637
}
37-
if (!PointerIsAligned(p,uint32)&&p+2 <=pend)
38+
if (!PointerIsAligned(p,uint32)&&
39+
p+2 <=pend)
3840
{
3941
crc=__crc32ch(crc,*(uint16*)p);
4042
p+=2;
4143
}
42-
if (!PointerIsAligned(p,uint64)&&p+4 <=pend)
44+
if (!PointerIsAligned(p,uint64)&&
45+
p+4 <=pend)
4346
{
4447
crc=__crc32cw(crc,*(uint32*)p);
4548
p+=4;

‎src/tools/pgindent/pgindent

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ $excludes ||= "$code_base/src/tools/pgindent/exclude_file_patterns"
5959
# easier to configure. Note that the typedefs need trailing newlines.
6060
my@whitelist = ("bool\n");
6161

62-
my%blacklist =map { +"$_\n"=> 1 }qw( FD_SET date interval timestamp ANY
63-
abs allocfunc iterator other pointer printfunc reference string type);
62+
my%blacklist =map { +"$_\n"=> 1 }qw(
63+
ANY FD_SET U abs allocfunc boolean date digit ilist interval iterator other
64+
pointer printfunc reference string timestamp type wrap
65+
);
6466

6567
# globals
6668
my@files;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp