mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Cosmetic improvements/code cleanup:
- replace some function signatures of the form "some_type foo()" with "some_type foo(void)" - replace a few instances of a literal 0 being used as a NULL pointer; there are more instances of this in the code, but I just fixed a few - in src/backend/utils/mb/wstrncmp.c, replace K&R style function declarations with ANSI style, remove use of 'register' keyword - remove an "extern" modifier that was applied to a function definition (rather than a declaration)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.73 2004/08/31 17:10:36 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.74 2004/10/10 23:37:16 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
|
||||
static void
|
||||
do_start()
|
||||
do_start(void)
|
||||
{
|
||||
StartTransactionCommand();
|
||||
elog(DEBUG4, "start transaction");
|
||||
@@ -60,7 +60,7 @@ do_start()
|
||||
|
||||
|
||||
static void
|
||||
do_end()
|
||||
do_end(void)
|
||||
{
|
||||
CommitTransactionCommand();
|
||||
elog(DEBUG4, "commit transaction");
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.194 2004/10/08 01:36:33 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.195 2004/10/10 23:37:16 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1012,7 +1012,7 @@ EnterString(char *str)
|
||||
|
||||
len = strlen(str);
|
||||
|
||||
node = FindStr(str, len, 0);
|
||||
node = FindStr(str, len, NULL);
|
||||
if (node)
|
||||
return node->strnum;
|
||||
else
|
||||
|
||||
@@ -38,10 +38,7 @@
|
||||
#include "mb/pg_wchar.h"
|
||||
|
||||
int
|
||||
pg_wchar_strncmp(s1, s2, n)
|
||||
register const pg_wchar *s1,
|
||||
*s2;
|
||||
register size_t n;
|
||||
pg_wchar_strncmp(const pg_wchar *s1, const pg_wchar *s2, size_t n)
|
||||
{
|
||||
if (n == 0)
|
||||
return 0;
|
||||
@@ -56,10 +53,7 @@ register size_t n;
|
||||
}
|
||||
|
||||
int
|
||||
pg_char_and_wchar_strncmp(s1, s2, n)
|
||||
register const char *s1;
|
||||
register const pg_wchar *s2;
|
||||
register size_t n;
|
||||
pg_char_and_wchar_strncmp(const char *s1, const pg_wchar *s2, size_t n)
|
||||
{
|
||||
if (n == 0)
|
||||
return 0;
|
||||
@@ -74,10 +68,9 @@ register size_t n;
|
||||
}
|
||||
|
||||
size_t
|
||||
pg_wchar_strlen(str)
|
||||
const pg_wchar *str;
|
||||
pg_wchar_strlen(const pg_wchar *str)
|
||||
{
|
||||
register const pg_wchar *s;
|
||||
const pg_wchar *s;
|
||||
|
||||
for (s = str; *s; ++s)
|
||||
;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.241 2004/10/09 23:13:10 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.242 2004/10/10 23:37:28 neilc Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4378,7 +4378,7 @@ DefineCustomStringVariable(
|
||||
define_custom_variable(&var->gen);
|
||||
}
|
||||
|
||||
extern void
|
||||
void
|
||||
EmitWarningsOnPlaceholders(const char *className)
|
||||
{
|
||||
struct config_generic **vars = guc_variables;
|
||||
|
||||
Reference in New Issue
Block a user