提交 793d5215 编写于 作者: H Heikki Linnakangas

Use Assert rather than assert in backend code.

上级 0a2a2600
......@@ -7,7 +7,6 @@
*/
#include <unistd.h>
#include <sys/stat.h>
#include <assert.h>
#include <dirent.h>
#include <sys/wait.h>
......@@ -984,7 +983,7 @@ gp_backup_launch__(PG_FUNCTION_ARGS)
/* Restore process interval timers */
restoreTimers(&savetimers);
assert(pszSaveBackupfileName != NULL && pszSaveBackupfileName[0] != '\0');
Assert(pszSaveBackupfileName != NULL && pszSaveBackupfileName[0] != '\0');
return DirectFunctionCall1(textin, CStringGetDatum(pszSaveBackupfileName));
}
......@@ -1442,7 +1441,7 @@ gp_restore_launch__(PG_FUNCTION_ARGS)
/* Restore process interval timers */
restoreTimers(&savetimers);
assert(pszBackupFileName != NULL && pszBackupFileName[0] != '\0');
Assert(pszBackupFileName != NULL && pszBackupFileName[0] != '\0');
return DirectFunctionCall1(textin, CStringGetDatum(pszBackupFileName));
}
......@@ -1631,7 +1630,7 @@ gp_write_backup_file__(PG_FUNCTION_ARGS)
fclose(f);
f = NULL;
assert(pszFileName != NULL && pszFileName[0] != '\0');
Assert(pszFileName != NULL && pszFileName[0] != '\0');
return DirectFunctionCall1(textin, CStringGetDatum(pszFileName));
}
......@@ -1923,7 +1922,7 @@ formBackupFilePathName(char *pszBackupDirectory, char *pszBackupKey, bool is_com
/* Now add up the length of the pieces */
len = strlen(pszBackupDirectory);
assert(len >= 1);
Assert(len >= 1);
if (pszBackupDirectory[strlen(pszBackupDirectory) - 1] != '/')
{
len++;
......@@ -2013,7 +2012,7 @@ formStatusFilePathName(char *pszBackupDirectory, char *pszBackupKey, bool bIsBac
/* Now add up the length of the pieces */
len = strlen(pszBackupDirectory);
assert(len >= 1);
Assert(len >= 1);
if (pszBackupDirectory[strlen(pszBackupDirectory) - 1] != '/')
len++;
......
......@@ -20,7 +20,6 @@
#include <unistd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <assert.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <arpa/inet.h>
......
......@@ -9,7 +9,6 @@
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>
......
......@@ -27,7 +27,6 @@
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include <assert.h>
#include <sys/time.h>
// #include "libpq/pqcomm.h"
#include "libpq/ip.h"
......
......@@ -10,7 +10,6 @@
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include "miscadmin.h"
#include "catalog/catalog.h"
......
......@@ -9,7 +9,6 @@
*/
#include "postgres.h"
#include <assert.h>
#include "miscadmin.h"
#include "gp-libpq-fe.h"
......
......@@ -10,7 +10,6 @@
*/
#include "postgres.h"
#include <assert.h>
#include "access/tuptoaster.h"
#include "utils/builtins.h"
#include "catalog/pg_type.h"
......@@ -85,7 +84,7 @@ makeCdbHash(int numsegs)
{
CdbHash *h;
assert(numsegs > 0); /* verify number of segments is legal. */
Assert(numsegs > 0); /* verify number of segments is legal. */
/* Create a pointer to a CdbHash that includes the hash properties */
h = palloc(sizeof(CdbHash));
......@@ -655,7 +654,7 @@ cdbhashreduce(CdbHash *h)
* therefore initialize to this value for
* error checking? */
assert(h->reducealg == REDUCE_BITMASK || h->reducealg == REDUCE_LAZYMOD);
Assert(h->reducealg == REDUCE_BITMASK || h->reducealg == REDUCE_LAZYMOD);
/*
* Reduce our 32-bit hash value to a segment number
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册