Skip to content

Commit

Permalink
Remove unnecessary #ifdef FRONTEND check to choose between strdup and…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
hlinnaka committed Mar 8, 2013
1 parent 71877c1 commit 2443a26
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/port/wait_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ char *
wait_result_to_str(int exitstatus)
{
char str[512];
char *result;

if (WIFEXITED(exitstatus))
{
Expand Down Expand Up @@ -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);
}

0 comments on commit 2443a26

Please sign in to comment.