diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2012-12-14 18:03:07 -0500 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2012-12-14 18:03:07 -0500 |
commit | 1c382655ad90b7cd224230452f7056040337facf (patch) | |
tree | 378e1dd57280308b4267f7f7c55677b233be3fd8 /src/bin/psql/stringutils.c | |
parent | 75758a6ff01156e163779f5f7386fa36720fb38f (diff) | |
download | postgresql-1c382655ad90b7cd224230452f7056040337facf.tar.gz postgresql-1c382655ad90b7cd224230452f7056040337facf.zip |
Provide Assert() for frontend code.
Per discussion on-hackers. psql is converted to use the new code.
Follows a suggestion from Heikki Linnakangas.
Diffstat (limited to 'src/bin/psql/stringutils.c')
-rw-r--r-- | src/bin/psql/stringutils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/psql/stringutils.c b/src/bin/psql/stringutils.c index b557c5a6bac..f0bed2bc003 100644 --- a/src/bin/psql/stringutils.c +++ b/src/bin/psql/stringutils.c @@ -245,8 +245,8 @@ strip_quotes(char *source, char quote, char escape, int encoding) char *src; char *dst; - psql_assert(source); - psql_assert(quote); + Assert(source != NULL); + Assert(quote != '\0'); src = dst = source; @@ -299,8 +299,8 @@ quote_if_needed(const char *source, const char *entails_quote, char *dst; bool need_quotes = false; - psql_assert(source); - psql_assert(quote); + Assert(source != NULL); + Assert(quote != '\0'); src = source; dst = ret = pg_malloc(2 * strlen(src) + 3); /* excess */ |