pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Proper patching source code with HOST_NAME_MAX usage
On Mon, Jan 13, 2020 at 04:25:20PM +0100, Matthias Petermann wrote:
> b) Convert the variable into a pointer variable and use allocation of the
> appropriate length at runtime? Disadvantage: memory would actually have to
> be released again, i.e. more intervention in the original source code than I
> actually want to do ..
In generally, I'd suggest go with this method for a global variable and
free it before updating the global variable after a successful hostname
call. But for a on-stack variable, going with the VLA is often easier.
Joerg
Home |
Main Index |
Thread Index |
Old Index