diff options
author | Neil Conway <neilc@samurai.com> | 2004-01-24 19:38:49 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2004-01-24 19:38:49 +0000 |
commit | 610d33c1949005e9658863441f31083f9f3ceb9b (patch) | |
tree | 861eb9dfec8dc43b4f5716f48aa52d4468128a90 /src/bin/psql/describe.c | |
parent | cb3dc829f639801219aab4ec35e53ef924ce75c5 (diff) | |
download | postgresql-610d33c1949005e9658863441f31083f9f3ceb9b.tar.gz postgresql-610d33c1949005e9658863441f31083f9f3ceb9b.zip |
This patch makes some of the memory manipulation performed by psql a
little more sane. Some parts of the code was using a static function
xmalloc() that did safe memory allocation (where "safe" means "bail
out on OOM"), but most of it was just invoking calloc() or malloc()
directly. Now almost everything invokes xmalloc() or xcalloc().
Diffstat (limited to 'src/bin/psql/describe.c')
-rw-r--r-- | src/bin/psql/describe.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 7e168ef8456..83aa3f1aa0a 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.92 2004/01/11 19:10:49 dennis Exp $ + * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.93 2004/01/24 19:38:49 neilc Exp $ */ #include "postgres_fe.h" #include "describe.h" @@ -39,21 +39,6 @@ static void processNamePattern(PQExpBuffer buf, const char *pattern, const char *schemavar, const char *namevar, const char *altnamevar, const char *visibilityrule); - -static void * -xmalloc(size_t size) -{ - void *tmp; - - tmp = malloc(size); - if (!tmp) - { - psql_error("out of memory\n"); - exit(EXIT_FAILURE); - } - return tmp; -} - static void * xmalloczero(size_t size) { |