The snprintf/vsnprintf functions return n. of chars that would have been written with large enough buffer. The length argument is size_t, whereas return type is int... (Historical stdio matter?) SUSv2 and C99 are in disagreement concerning a snprintf call with len==0; with C99 allowing buf==NULL in that case.
The ssize_t type allows a -1 error return where a size_t would otherwise be suitable. Like e.g. read() or pwrite.
In reply to Re^3: [Ceph::RADOS] Help Debugging Inline C
by oiskuu
in thread [Ceph::RADOS] Help Debugging Inline C
by three18ti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |