Re: get_progname() should not be const char *? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: get_progname() should not be const char *?
Date
Msg-id 29286.1360036357@sss.pgh.pa.us
Whole thread Raw
In response to get_progname() should not be const char *?  (Phil Sorber <phil@omniti.com>)
Responses Re: get_progname() should not be const char *?  (Phil Sorber <phil@omniti.com>)
List pgsql-hackers
Phil Sorber <phil@omniti.com> writes:
> get_progname() returns a strdup()'d value. Shouldn't it then be simply
> char * and not const char *? Otherwise free() complains loudly without
> a cast.

I don't believe that callers should be trying to free() the result.
Whether it's been strdup'd or not is not any of their business.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Reminder to committers: we're done with 8.3 branch
Next
From: Phil Sorber
Date:
Subject: Re: get_progname() should not be const char *?