NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/54574: usr.bin/make/parse.c $Id: 1.231 drops core on NetBSD-5.2 in realpath(3)



David Holland <dholland-bugs%netbsd.org@localhost> wrote:
>  On Thu, Sep 26, 2019 at 08:00:02PM +0000, Simon J. Gerraty wrote:
>   >   {
>   >   	static Boolean fatal_warning_error_printed = FALSE;
>   >  +	char dirbuf[MAXPATHLEN+1];
>  
>  nit: please use PATH_MAX (more portable) and it doesn't need +1 as it
>  is defined to include space for a null terminator.

FWIW I used MAXPATHLEN because that's what the rest of make is using.

The portability issue is probably somewhat moot for bmake 
since make.h ensures both MAXPATHLEN and PATH_MAX are defined -
potentially in terms of BMAKE_PATH_MAX

Thanks
--sjg


Home | Main Index | Thread Index | Old Index