git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a70316
)
nfs: Remove unneeded checking of the return value from scnprintf
author
Kinglong Mee
<kinglongmee@gmail.com>
Mon, 31 Aug 2015 02:53:43 +0000
(10:53 +0800)
committer
Trond Myklebust
<trond.myklebust@primarydata.com>
Tue, 1 Sep 2015 22:19:40 +0000
(15:19 -0700)
The return value from scnprintf always less than the buffer length.
So, result >= len always false. This patch removes those checking.
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
{
int i;
i = vsnprintf(buf, size, fmt, args);
if (likely(i < size))
return i;
if (size != 0)
return size - 1;
return 0;
}
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c
patch
|
blob
|
history
diff --cc
fs/nfs/nfs4proc.c
Simple merge