]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: make sure to correctly check the returned 'ms' in date2std_log
authorWilly Tarreau <w@1wt.eu>
Sat, 29 Feb 2020 08:08:02 +0000 (09:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 29 Feb 2020 08:08:02 +0000 (09:08 +0100)
commit7d9421deca68aed6b37effb91c67c03ae93439c2
tree6cf1be19d96008bbdb37030342e91567657b0f89
parent77e463f729de676ec3343ed3318a2cfa5d3a6a8b
MINOR: tools: make sure to correctly check the returned 'ms' in date2std_log

In commit 4eee38a ("BUILD/MINOR: tools: fix build warning in the date
conversion functions") we added some return checks to shut build
warnings but the last test is useless since the tested pointer is not
updated by the last call to utoa_pad() used to convert the milliseconds.
It turns out the original code from 2012 already skipped this part,
probably in order to avoid the risk of seeing a millisecond field not
belonging to the 0-999 range. Better keep the check and put the code
into stricter shape.

No backport is needed. This fixes issue #526.
src/standard.c