From 6144cf99adae5ffebbc549a4e0f3c6e05e51ad16 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 23 Jan 2019 12:37:12 -0500 Subject: Capture more BUG warnings in util/time test These are ones that happen on windows only. Fixes bug 29161. --- src/lib/encoding/time_fmt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/encoding/time_fmt.c') diff --git a/src/lib/encoding/time_fmt.c b/src/lib/encoding/time_fmt.c index 5b2440d1ab..40543d41e0 100644 --- a/src/lib/encoding/time_fmt.c +++ b/src/lib/encoding/time_fmt.c @@ -39,6 +39,8 @@ * * Convert *timep to a struct tm in local time, and store the value in * *result. Return the result on success, or NULL on failure. + * + * Treat malformatted inputs localtime outputs as a BUG. */ struct tm * tor_localtime_r(const time_t *timep, struct tm *result) @@ -56,6 +58,8 @@ tor_localtime_r(const time_t *timep, struct tm *result) * * Convert *timep to a struct tm in UTC, and store the value in * *result. Return the result on success, or NULL on failure. + * + * Treat malformatted inputs or gmtime outputs as a BUG. */ struct tm * tor_gmtime_r(const time_t *timep, struct tm *result) -- cgit v1.2.3-54-g00ecf