1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +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:
Andrew Dunstan
2012-12-14 18:03:07 -05:00
parent 75758a6ff0
commit 1c382655ad
7 changed files with 30 additions and 25 deletions

View File

@ -99,7 +99,7 @@ HandleSlashCmds(PsqlScanState scan_state,
char *cmd;
char *arg;
psql_assert(scan_state);
Assert(scan_state != NULL);
/* Parse off the command name */
cmd = psql_scan_slash_command(scan_state);
@ -1819,7 +1819,7 @@ editFile(const char *fname, int lineno)
char *sys;
int result;
psql_assert(fname);
Assert(fname != NULL);
/* Find an editor to use */
editorName = getenv("PSQL_EDITOR");
@ -2177,7 +2177,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
{
size_t vallen = 0;
psql_assert(param);
Assert(param != NULL);
if (value)
vallen = strlen(value);