postgres.git / summary / log / commit / refs

commit    2443a26b9b905e66cd9b95a2faf57e1f1ebcafb1
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Fri Mar 08 09:21:44 2013 +0000

    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.


src/port/wait_error.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/port/wait_error.c b/src/port/wait_error.c index ac9c52b3169..01728d7f764 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); } [parent: 71877c18a869]