Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
dd382b3c
Commit
dd382b3c
authored
Feb 05, 2004
by
Andrew Morton
Committed by
Greg Kroah-Hartman
Feb 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] snprintf() commentary
From: Paul Jackson <pj@sgi.com> Explain the snprintf() return value.
parent
fd555edb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
lib/vsprintf.c
lib/vsprintf.c
+10
-0
No files found.
lib/vsprintf.c
View file @
dd382b3c
...
@@ -234,6 +234,11 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i
...
@@ -234,6 +234,11 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i
* @fmt: The format string to use
* @fmt: The format string to use
* @args: Arguments for the format string
* @args: Arguments for the format string
*
*
* The return value is the number of characters which would be
* generated for the given input, excluding the trailing null,
* as per ISO C99. If the return is greater than or equal to
* @size, the resulting string is truncated.
*
* Call this function if you are already dealing with a va_list.
* Call this function if you are already dealing with a va_list.
* You probably want snprintf instead.
* You probably want snprintf instead.
*/
*/
...
@@ -482,6 +487,11 @@ EXPORT_SYMBOL(vsnprintf);
...
@@ -482,6 +487,11 @@ EXPORT_SYMBOL(vsnprintf);
* @size: The size of the buffer, including the trailing null space
* @size: The size of the buffer, including the trailing null space
* @fmt: The format string to use
* @fmt: The format string to use
* @...: Arguments for the format string
* @...: Arguments for the format string
*
* The return value is the number of characters which would be
* generated for the given input, excluding the trailing null,
* as per ISO C99. If the return is greater than or equal to
* @size, the resulting string is truncated.
*/
*/
int
snprintf
(
char
*
buf
,
size_t
size
,
const
char
*
fmt
,
...)
int
snprintf
(
char
*
buf
,
size_t
size
,
const
char
*
fmt
,
...)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment