lib/vsprintf.c: fix vscnprintf() if @size is == 0
authorAnton Arapov <aarapov@redhat.com>
Thu, 13 Jan 2011 00:59:49 +0000 (16:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:10 +0000 (08:03 -0800)
commitb921c69fb262988ff7856493a8453661a1bac814
tree87496b306fb609adcbf65b2fe5151a49e0957ca6
parenta3f938bf6f5746d39e013d03ba13118a393fee96
lib/vsprintf.c: fix vscnprintf() if @size is == 0

vscnprintf() should return 0 if @size is == 0.  Update the comment for it,
as @size is unsigned.

This change based on the code of commit
b903c0b8899b46829a9b80ba55b61079b35940ec ("lib: fix scnprintf() if @size
is == 0") moves the real fix into vscnprinf() from scnprintf() and makes
scnprintf() call vscnprintf(), thus avoid code duplication.

Signed-off-by: Anton Arapov <aarapov@redhat.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/vsprintf.c