[PATCH] Define PATH_MAX if it's not defined
Salvo Tomaselli
tiposchi at tiscali.it
Wed Aug 27 22:21:22 PDT 2014
Hello,
> Oh. And as I read this again. I don't think this makes sense.
> a) you should test for == PATH_MAX (as snprintf returns the number of
> bytes printed, excluding the trailing '\0' and never prints more than 'n'
> characters, in this case PATH_MAX.
>From my manpage:
The functions snprintf() and vsnprintf() do not write more than size bytes
(including the terminating null byte ('\0')). If the output was truncated due
to this limit, then the return value is the number of characters (excluding
the terminating null byte) which would have been written to the final string
if enough space had been available. Thus, a return value of size or more
means that the output was truncated. (See also below under NOTES.)
So that's why.
> Do I still have permission to add your Signed-off-by? :-)
Yes you can add the signed off, I thought git was supposed to add it
automatically when creating the patch :-)
--
Salvo Tomaselli
"Io non mi sento obbligato a credere che lo stesso Dio che ci ha dotato di
senso, ragione ed intelletto intendesse che noi ne facessimo a meno."
-- Galileo Galilei
http://ltworf.github.io/ltworf/
More information about the subsurface
mailing list