aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/init')
-rw-r--r--src/backend/utils/init/enbl.c6
-rw-r--r--src/backend/utils/init/findbe.c24
-rw-r--r--src/backend/utils/init/miscinit.c16
3 files changed, 23 insertions, 23 deletions
diff --git a/src/backend/utils/init/enbl.c b/src/backend/utils/init/enbl.c
index 1c27a0dc489..7312c4fa708 100644
--- a/src/backend/utils/init/enbl.c
+++ b/src/backend/utils/init/enbl.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/enbl.c,v 1.3 1998/08/25 21:04:40 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/enbl.c,v 1.4 1998/09/01 03:26:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,12 +35,12 @@ BypassEnable(int *enableCountInOutP, bool on)
if (on)
{
*enableCountInOutP += 1;
- return ((bool) (*enableCountInOutP >= 2));
+ return (bool) (*enableCountInOutP >= 2);
}
AssertState(*enableCountInOutP >= 1);
*enableCountInOutP -= 1;
- return ((bool) (*enableCountInOutP >= 1));
+ return (bool) (*enableCountInOutP >= 1);
}
diff --git a/src/backend/utils/init/findbe.c b/src/backend/utils/init/findbe.c
index 06d6c7a5ef1..115c21e2f7d 100644
--- a/src/backend/utils/init/findbe.c
+++ b/src/backend/utils/init/findbe.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.10 1998/06/15 19:29:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.11 1998/09/01 03:26:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,7 +63,7 @@ ValidateBinary(char *path)
if (DebugLvl > 1)
fprintf(stderr, "ValidateBinary: pathname \"%s\" is too long\n",
path);
- return (-1);
+ return -1;
}
if (stat(path, &buf) < 0)
@@ -71,14 +71,14 @@ ValidateBinary(char *path)
if (DebugLvl > 1)
fprintf(stderr, "ValidateBinary: can't stat \"%s\"\n",
path);
- return (-1);
+ return -1;
}
if (!(buf.st_mode & S_IFREG))
{
if (DebugLvl > 1)
fprintf(stderr, "ValidateBinary: \"%s\" is not a regular file\n",
path);
- return (-1);
+ return -1;
}
/*
@@ -104,7 +104,7 @@ ValidateBinary(char *path)
if (DebugLvl > 1 && !(is_r && is_x))
fprintf(stderr, "ValidateBinary: \"%s\" is not user read/execute\n",
path);
- return (is_x ? (is_r ? 0 : -2) : -1);
+ return is_x ? (is_r ? 0 : -2) : -1;
}
pwp = getpwuid(euid);
if (pwp)
@@ -130,7 +130,7 @@ ValidateBinary(char *path)
if (DebugLvl > 1 && !(is_r && is_x))
fprintf(stderr, "ValidateBinary: \"%s\" is not group read/execute\n",
path);
- return (is_x ? (is_r ? 0 : -2) : -1);
+ return is_x ? (is_r ? 0 : -2) : -1;
}
}
is_r = buf.st_mode & S_IROTH;
@@ -138,7 +138,7 @@ ValidateBinary(char *path)
if (DebugLvl > 1 && !(is_r && is_x))
fprintf(stderr, "ValidateBinary: \"%s\" is not other read/execute\n",
path);
- return (is_x ? (is_r ? 0 : -2) : -1);
+ return is_x ? (is_r ? 0 : -2) : -1;
}
/*
@@ -189,11 +189,11 @@ FindExec(char *full_path, char *argv0, char *binary_name)
if (DebugLvl)
fprintf(stderr, "FindExec: found \"%s\" using argv[0]\n",
full_path);
- return (0);
+ return 0;
}
fprintf(stderr, "FindExec: invalid binary \"%s\"\n",
buf);
- return (-1);
+ return -1;
}
/*
@@ -228,14 +228,14 @@ FindExec(char *full_path, char *argv0, char *binary_name)
fprintf(stderr, "FindExec: found \"%s\" using PATH\n",
full_path);
free(path);
- return (0);
+ return 0;
case -1: /* wasn't even a candidate, keep looking */
break;
case -2: /* found but disqualified */
fprintf(stderr, "FindExec: could not read binary \"%s\"\n",
buf);
free(path);
- return (-1);
+ return -1;
}
if (!endp) /* last one */
break;
@@ -244,5 +244,5 @@ FindExec(char *full_path, char *argv0, char *binary_name)
}
fprintf(stderr, "FindExec: could not find a %s to execute...\n", binary_name);
- return (-1);
+ return -1;
}
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index 1a3d4bc8506..59106555157 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.20 1998/08/19 02:03:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.21 1998/09/01 03:26:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -152,7 +152,7 @@ static ProcessingMode Mode = NoProcessing;
bool
IsNoProcessingMode()
{
- return ((bool) (Mode == NoProcessing));
+ return (bool) (Mode == NoProcessing);
}
/*
@@ -162,7 +162,7 @@ IsNoProcessingMode()
bool
IsBootstrapProcessingMode()
{
- return ((bool) (Mode == BootstrapProcessing));
+ return (bool) (Mode == BootstrapProcessing);
}
/*
@@ -172,7 +172,7 @@ IsBootstrapProcessingMode()
bool
IsInitProcessingMode()
{
- return ((bool) (Mode == InitProcessing));
+ return (bool) (Mode == InitProcessing);
}
/*
@@ -182,7 +182,7 @@ IsInitProcessingMode()
bool
IsNormalProcessingMode()
{
- return ((bool) (Mode == NormalProcessing));
+ return (bool) (Mode == NormalProcessing);
}
/*
@@ -207,7 +207,7 @@ SetProcessingMode(ProcessingMode mode)
ProcessingMode
GetProcessingMode()
{
- return (Mode);
+ return Mode;
}
/* ----------------------------------------------------------------
@@ -255,7 +255,7 @@ getdatabaseencoding()
static bool
isblank(const char c)
{
- return (c == ' ' || c == 9 /* tab */ );
+ return c == ' ' || c == 9 /* tab */ ;
}
static void
@@ -446,7 +446,7 @@ int
GetUserId()
{
Assert(OidIsValid(UserId));
- return (UserId);
+ return UserId;
}
void