]> granicus.if.org Git - psmisc/commit
pstree: Remove need for PATH_MAX
authorSvante Signell <svante.signell@gmail.com>
Mon, 12 Jun 2017 00:25:57 +0000 (10:25 +1000)
committerCraig Small <csmall@enc.com.au>
Mon, 12 Jun 2017 00:25:57 +0000 (10:25 +1000)
commit5e510d1c9ed8cb61f9c504076a7c4828624b8b07
tree15c70ed9a96e1fd2d9e4cc34218f132b5369474f
parent0c0d391d5713a46fa41e131ab5ae011e5ec99df2
pstree: Remove need for PATH_MAX

This commit removes the need for PATH_MAX in pstree.
It uses the fact that calling snprintf() with *str=NULL and size=0
returns the number of bytes needed for the string according to
POSIX.1-2001 and later (which is supported by all glibc versions
since 2.1, see snprintf(3)).

References:
 https://bugs.debian.org/750405

Signed-off-by: Craig Small <csmall@enc.com.au>
ChangeLog
src/pstree.c