diff options
author | Jeff Law <law@redhat.com> | 2012-08-13 13:12:18 -0600 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 2012-08-13 13:12:18 -0600 |
commit | 42443a47925ece8bb32b83c3edd58e404bd6b5cb (patch) | |
tree | 400fd3112d1f132d3a0d654fa8162228a717bbc6 | |
parent | a1079206686b5b0f50b7173689637064fd1c7f37 (diff) | |
download | glibc-42443a47925ece8bb32b83c3edd58e404bd6b5cb.tar.gz glibc-42443a47925ece8bb32b83c3edd58e404bd6b5cb.tar.xz glibc-42443a47925ece8bb32b83c3edd58e404bd6b5cb.zip |
* manual/stdio.texi (snprintf): Clarify handling of the trailing
null byte in the output string.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | manual/stdio.texi | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 386f8493c2..2b3d2e4550 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-08-13 Jeff Law <law@redhat.com> + + * manual/stdio.texi (snprintf): Clarify handling of the trailing + null byte in the output string. + 2012-08-10 Joseph Myers <joseph@codesourcery.com> * sysdeps/unix/sysv/linux/kernel-features.h diff --git a/manual/stdio.texi b/manual/stdio.texi index c58ca22b2d..be769a538f 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -2341,6 +2341,8 @@ The @code{snprintf} function is similar to @code{sprintf}, except that the @var{size} argument specifies the maximum number of characters to produce. The trailing null character is counted towards this limit, so you should allocate at least @var{size} characters for the string @var{s}. +If @var{size} is zero, nothing, not even the null byte, shall be written and +@var{s} may be a null pointer. The return value is the number of characters which would be generated for the given input, excluding the trailing null. If this value is |