Always check return value of strftime().
authorBen Pfaff <blp@nicira.com>
Thu, 2 May 2013 23:16:06 +0000 (16:16 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 8 May 2013 17:53:07 +0000 (10:53 -0700)
commit3e78870d0bfc3be3255a7ca71588692c6615f0c7
tree1873dd1ea456a382c7723d39fd5429fb1e992566
parentdd43a558597bbf99a62541bc77e85f86f63e2f12
Always check return value of strftime().

strftime() returns 0 and leaves the contents of the output buffer
unspecified if the output buffer is not big enough.  Thus, one should
check strftime()'s return value.  Until now, OVS has had a few invocations
of strftime() that did not check the return value.  This commit fixes
those.  I believe that the buffers were always large enough in each case,
but it's better to be safe.

Reported-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/dynamic-string.c
lib/dynamic-string.h
lib/table.c
lib/vlog.c
ovsdb/ovsdb-tool.c
utilities/ovs-ofctl.c