Commit 0e81ddde authored by Alvaro Herrera's avatar Alvaro Herrera

Rename "string" pstrdup argument to "in"

The former name collides with a symbol also used in the isolation test's
parser, causing assorted failures in certain platforms.
parent 0f980b0e
...@@ -67,17 +67,17 @@ pg_realloc(void *ptr, size_t size) ...@@ -67,17 +67,17 @@ pg_realloc(void *ptr, size_t size)
* "Safe" wrapper around strdup(). * "Safe" wrapper around strdup().
*/ */
char * char *
pg_strdup(const char *string) pg_strdup(const char *in)
{ {
char *tmp; char *tmp;
if (!string) if (!in)
{ {
fprintf(stderr, fprintf(stderr,
_("cannot duplicate null pointer (internal error)\n")); _("cannot duplicate null pointer (internal error)\n"));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
tmp = strdup(string); tmp = strdup(in);
if (!tmp) if (!tmp)
{ {
fprintf(stderr, _("out of memory\n")); fprintf(stderr, _("out of memory\n"));
...@@ -116,9 +116,9 @@ pfree(void *pointer) ...@@ -116,9 +116,9 @@ pfree(void *pointer)
} }
char * char *
pstrdup(const char *string) pstrdup(const char *in)
{ {
return pg_strdup(string); return pg_strdup(in);
} }
void * void *
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#ifndef FE_MEMUTILS_H #ifndef FE_MEMUTILS_H
#define FE_MEMUTILS_H #define FE_MEMUTILS_H
extern char *pg_strdup(const char *string); extern char *pg_strdup(const char *in);
extern void *pg_malloc(size_t size); extern void *pg_malloc(size_t size);
extern void *pg_malloc0(size_t size); extern void *pg_malloc0(size_t size);
extern void *pg_realloc(void *pointer, size_t size); extern void *pg_realloc(void *pointer, size_t size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment