Fix bugs in [v]snprintf usage
authorKen Raeburn <raeburn@permabit.com>
Wed, 30 Jan 2013 21:31:09 +0000 (22:31 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 30 Jan 2013 21:31:09 +0000 (22:31 +0100)
commit98ffb8f3ecebed9984d1744f142eb8be10c14dbd
tree2cca7941cec5f1dd015c337e6d9b63c0416ffc76
parent7d5185c3b4856421a4c72852cc5e86e04db679f0
Fix bugs in [v]snprintf usage

When calling snprintf, supply the full buffer size instead of
one byte less.

When using the returned length from vsnprintf for logging, don't write
more than the actual buffer size (minus one for the trailing \0), in
case the formatted string was truncated.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/falloc.c
filesetup.c
fio.h
init.c
iolog.c
log.c
server.c
stat.c
t/log.c