File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose is to
2525guarantee consistent behavior in corner cases, which the Standard C functions do
2626not.
2727
28- The wrappers ensure that * str*[* size * -1] is always ``'\0' `` upon return. They
28+ The wrappers ensure that `` str[ size-1] `` is always ``'\0' `` upon return. They
2929never write more than *size * bytes (including the trailing ``'\0' ``) into str.
3030Both functions require that ``str != NULL``, ``size > 0``, ``format != NULL``
3131and ``size < INT_MAX``.
@@ -34,13 +34,13 @@ The return value (*rv*) for these functions should be interpreted as follows:
3434
3535* When ``0 <= rv < size``, the output conversion was successful and *rv*
3636 characters were written to *str* (excluding the trailing ``'\0' `` byte at
37- * str*[*rv *] ).
37+ `` str[rv] `` ).
3838
3939* When ``rv >= size``, the output conversion was truncated and a buffer with
40- ``rv + 1`` bytes would have been needed to succeed. * str*[* size* -1] is ``'\0'``
40+ ``rv + 1`` bytes would have been needed to succeed. `` str[ size-1]`` is ``'\0'``
4141 in this case.
4242
43- * When ``rv < 0``, "something bad happened." * str*[* size* -1] is ``'\0'`` in
43+ * When ``rv < 0``, "something bad happened." `` str[ size-1]`` is ``'\0'`` in
4444 this case too, but the rest of *str* is undefined. The exact cause of the error
4545 depends on the underlying platform.
4646
You can’t perform that action at this time.
0 commit comments