diff options
Diffstat (limited to 'src/bin/pg_basebackup/streamutil.c')
| -rw-r--r-- | src/bin/pg_basebackup/streamutil.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c index 71abbfa9de..8a43c4bad1 100644 --- a/src/bin/pg_basebackup/streamutil.c +++ b/src/bin/pg_basebackup/streamutil.c @@ -26,43 +26,6 @@ static char *dbpassword = NULL; PGconn *conn = NULL; /* - * strdup() and malloc() replacements that print an error and exit - * if something goes wrong. Can never return NULL. - */ -char * -pg_strdup(const char *s) -{ - char *result; - - result = strdup(s); - if (!result) - { - fprintf(stderr, _("%s: out of memory\n"), progname); - exit(1); - } - return result; -} - -void * -pg_malloc0(size_t size) -{ - void *result; - - /* Avoid unportable behavior of malloc(0) */ - if (size == 0) - size = 1; - result = malloc(size); - if (!result) - { - fprintf(stderr, _("%s: out of memory\n"), progname); - exit(1); - } - MemSet(result, 0, size); - return result; -} - - -/* * Connect to the server. Returns a valid PGconn pointer if connected, * or NULL on non-permanent error. On permanent error, the function will * call exit(1) directly. |
