mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Provide Assert() for frontend code.
Per discussion on-hackers. psql is converted to use the new code. Follows a suggestion from Heikki Linnakangas.
This commit is contained in:
@ -3558,7 +3558,7 @@ complete_from_list(const char *text, int state)
|
||||
const char *item;
|
||||
|
||||
/* need to have a list */
|
||||
psql_assert(completion_charpp);
|
||||
Assert(completion_charpp != NULL);
|
||||
|
||||
/* Initialization */
|
||||
if (state == 0)
|
||||
@ -3620,7 +3620,7 @@ complete_from_list(const char *text, int state)
|
||||
static char *
|
||||
complete_from_const(const char *text, int state)
|
||||
{
|
||||
psql_assert(completion_charp);
|
||||
Assert(completion_charp != NULL);
|
||||
if (state == 0)
|
||||
{
|
||||
if (completion_case_sensitive)
|
||||
@ -3708,7 +3708,7 @@ complete_from_files(const char *text, int state)
|
||||
/* expect a NULL return for the empty string only */
|
||||
if (!unquoted_text)
|
||||
{
|
||||
psql_assert(!*text);
|
||||
Assert(*text == '\0');
|
||||
unquoted_text = text;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user