From: Heikki Linnakangas Date: Fri, 8 Mar 2013 09:21:44 +0000 (+0200) Subject: Remove unnecessary #ifdef FRONTEND check to choose between strdup and pstrdup. X-Git-Tag: REL9_3_BETA1~255 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2443a26b9b905e66cd9b95a2faf57e1f1ebcafb1;p=postgresql Remove unnecessary #ifdef FRONTEND check to choose between strdup and pstrdup. The libpgcommon patch made that unnecessary, palloc and friends are now available in frontend programs too, mapped to plain old malloc. As pointed out by Alvaro Herrera. --- diff --git a/src/port/wait_error.c b/src/port/wait_error.c index ac9c52b316..01728d7f76 100644 --- a/src/port/wait_error.c +++ b/src/port/wait_error.c @@ -34,7 +34,6 @@ char * wait_result_to_str(int exitstatus) { char str[512]; - char *result; if (WIFEXITED(exitstatus)) { @@ -83,10 +82,5 @@ wait_result_to_str(int exitstatus) _("child process exited with unrecognized status %d"), exitstatus); -#ifndef FRONTEND - result = pstrdup(str); -#else - result = strdup(str); -#endif - return result; + return pstrdup(str); }