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

Commit7069dbc

Browse files
author
Neil Conway
committed
More minor cosmetic improvements:
- remove another senseless "extern" keyword that was applied to afunction definition- change a foo more function signatures from "some_type foo()" to"some_type foo(void)"- rewrite another K&R style function definition- make the type of the "action" function pointer in the KeyWord structin src/backend/utils/adt/formatting.c more precise
1 parent1da2bcc commit7069dbc

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

‎src/backend/executor/spi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.130 2004/10/12 21:54:37 petere Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.131 2004/10/13 01:25:10 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -348,7 +348,7 @@ SPI_execp(void *plan, Datum *Values, const char *Nulls, int tcount)
348348
* Passing snapshot == InvalidSnapshot will select the normal behavior of
349349
* fetching a new snapshot for each query.
350350
*/
351-
externint
351+
int
352352
SPI_execute_snapshot(void*plan,
353353
Datum*Values,constchar*Nulls,
354354
Snapshotsnapshot,Snapshotcrosscheck_snapshot,
@@ -1629,13 +1629,13 @@ _SPI_cursor_operation(Portal portal, bool forward, int count,
16291629

16301630

16311631
staticMemoryContext
1632-
_SPI_execmem()
1632+
_SPI_execmem(void)
16331633
{
16341634
returnMemoryContextSwitchTo(_SPI_current->execCxt);
16351635
}
16361636

16371637
staticMemoryContext
1638-
_SPI_procmem()
1638+
_SPI_procmem(void)
16391639
{
16401640
returnMemoryContextSwitchTo(_SPI_current->procCxt);
16411641
}

‎src/backend/port/sysv_shmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1994, Regents of the University of California
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.38 2004/09/24 05:27:35 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.39 2004/10/13 01:25:11 neilc Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -143,7 +143,7 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size)
143143
#ifdefEXEC_BACKEND
144144
memAddress=shmat(shmid,UsedShmemSegAddr,0);
145145
#else
146-
memAddress=shmat(shmid,0,0);
146+
memAddress=shmat(shmid,NULL,0);
147147
#endif
148148
#endif
149149

‎src/backend/utils/adt/formatting.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.78 2004/08/30 02:54:39 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.79 2004/10/13 01:25:11 neilc Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2004, PostgreSQL Global Development Group
@@ -129,23 +129,25 @@ typedef struct
129129
type;/* prefix / postfix*/
130130
}KeySuffix;
131131

132+
typedefstructFormatNodeFormatNode;
133+
132134
typedefstruct
133135
{
134136
char*name;/* keyword*/
135137
/* action for keyword*/
136138
intlen,/* keyword length*/
137-
(*action) (),
139+
(*action) (intarg,char*inout,intsuf,intflag,FormatNode*node,void*data),
138140
id;/* keyword id*/
139141
boolisitdigit;/* is expected output/input digit */
140142
}KeyWord;
141143

142-
typedefstruct
144+
structFormatNode
143145
{
144146
inttype;/* node type*/
145147
KeyWord*key;/* if node type is KEYWORD*/
146148
intcharacter,/* if node type is CHAR*/
147149
suffix;/* keyword suffix*/
148-
}FormatNode;
150+
};
149151

150152
#defineNODE_TYPE_END1
151153
#defineNODE_TYPE_ACTION2

‎src/backend/utils/mb/mbutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* (currently mule internal code (mic) is used)
55
* Tatsuo Ishii
66
*
7-
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.47 2004/08/29 05:06:51 momjian Exp $
7+
* $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.48 2004/10/13 01:25:12 neilc Exp $
88
*/
99
#include"postgres.h"
1010

@@ -574,7 +574,7 @@ SetDatabaseEncoding(int encoding)
574574
}
575575

576576
void
577-
SetDefaultClientEncoding()
577+
SetDefaultClientEncoding(void)
578578
{
579579
ClientEncoding=&pg_enc2name_tbl[GetDatabaseEncoding()];
580580
}

‎src/backend/utils/mb/wstrcmp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939
#include"mb/pg_wchar.h"
4040

4141
int
42-
pg_char_and_wchar_strcmp(s1,s2)
43-
registerconstchar*s1;
44-
registerconstpg_wchar*s2;
42+
pg_char_and_wchar_strcmp(constchar*s1,constpg_wchar*s2)
4543
{
4644
while ((pg_wchar)*s1==*s2++)
4745
if (*s1++==0)

‎src/interfaces/ecpg/preproc/output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include"extern.h"
44

55
void
6-
output_line_number()
6+
output_line_number(void)
77
{
88
if (input_filename)
99
fprintf(yyout,"\n#line %d \"%s\"\n",yylineno,input_filename);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp