1. snprintf(foo, 0. "XXX") is guaranteed not to write in foo by the
standard (ISO/IEC 9899 7.19.6.5) but our implementation handles this
as if the buffer has a size of (size_t)-1.
2. snprintf(NULL, 0, "XXX") leaks memory since cantwrite() allocates
memory if _bf._base == NULL, and this buffer is never freed
(PR 16483).
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.
the first two items result in the addition of code similar to the
following in various functions:
_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif