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:
@ -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);
|
||||
|
Reference in New Issue
Block a user