diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-12-01 22:14:40 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-12-01 22:14:40 +0000 |
commit | 35ddc2edeea919bad940b3e0ca8619688adba4b1 (patch) | |
tree | 657717f5ea7e06458eb15f737854b66be513f5fc /src/bin/psql/variables.c | |
parent | abd5d75c4c0d101d8559d3c7c74dc77661f085a6 (diff) | |
download | postgresql-35ddc2edeea919bad940b3e0ca8619688adba4b1.tar.gz postgresql-35ddc2edeea919bad940b3e0ca8619688adba4b1.zip |
This patch reduces some unsightly #ifdefs, and fixes two typos in
comments in the psql code. This doesn't make any functional change, so
feel free to save it for 7.5
Neil Conway
Diffstat (limited to 'src/bin/psql/variables.c')
-rw-r--r-- | src/bin/psql/variables.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/bin/psql/variables.c b/src/bin/psql/variables.c index 2275b818fb4..21dc8aecb68 100644 --- a/src/bin/psql/variables.c +++ b/src/bin/psql/variables.c @@ -3,14 +3,12 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/variables.c,v 1.14 2003/11/29 19:52:07 pgsql Exp $ + * $PostgreSQL: pgsql/src/bin/psql/variables.c,v 1.15 2003/12/01 22:14:40 momjian Exp $ */ #include "postgres_fe.h" +#include "common.h" #include "variables.h" -#include <assert.h> - - VariableSpace CreateVariableSpace(void) { @@ -46,10 +44,8 @@ GetVariable(VariableSpace space, const char *name) for (current = space; current; current = current->next) { -#ifdef USE_ASSERT_CHECKING - assert(current->name); - assert(current->value); -#endif + psql_assert(current->name); + psql_assert(current->value); if (strcmp(current->name, name) == 0) return current->value; } @@ -161,10 +157,8 @@ SetVariable(VariableSpace space, const char *name, const char *value) for (current = space, previous = NULL; current; previous = current, current = current->next) { -#ifdef USE_ASSERT_CHECKING - assert(current->name); - assert(current->value); -#endif + psql_assert(current->name); + psql_assert(current->value); if (strcmp(current->name, name) == 0) { free(current->value); @@ -203,10 +197,8 @@ DeleteVariable(VariableSpace space, const char *name) for (current = space, previous = NULL; current; previous = current, current = current->next) { -#ifdef USE_ASSERT_CHECKING - assert(current->name); - assert(current->value); -#endif + psql_assert(current->name); + psql_assert(current->value); if (strcmp(current->name, name) == 0) { free(current->name); |