]> granicus.if.org Git - postgresql/commitdiff
Remove unnecessary #ifdef FRONTEND check to choose between strdup and pstrdup.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 8 Mar 2013 09:21:44 +0000 (11:21 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 8 Mar 2013 09:23:33 +0000 (11:23 +0200)
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

index ac9c52b3169fe40d1f43c8f52f60d6216f73a89c..01728d7f7640133fc43e0faf68c504b7e9432ed2 100644 (file)
@@ -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);
 }