aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r--src/bin/psql/common.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index f5bd0f6d42d..1cb30088c48 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -70,26 +70,12 @@ pg_malloc(size_t size)
}
void *
-pg_malloc_zero(size_t size)
+pg_malloc0(size_t size)
{
void *tmp;
tmp = pg_malloc(size);
- memset(tmp, 0, size);
- return tmp;
-}
-
-void *
-pg_calloc(size_t nmemb, size_t size)
-{
- void *tmp;
-
- tmp = calloc(nmemb, size);
- if (!tmp)
- {
- psql_error("out of memory\n");
- exit(EXIT_FAILURE);
- }
+ MemSet(tmp, 0, size);
return tmp;
}