From 606599e1b75bd972167796e8a3f88a7821d3d8c6 Mon Sep 17 00:00:00 2001 From: Andy Dougherty Date: Thu, 17 Jan 2013 10:34:33 -0500 Subject: Added asserts() to check the arguments to S_copy_little_tm_to_big_TM. The original version just zeroed dest if src == NULL, but that code path was never used. (gcc -Os inlined the function and optimized the test away anyway.) --- time64.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'time64.c') diff --git a/time64.c b/time64.c index 5ae5e7da5e..8cbfa7c170 100644 --- a/time64.c +++ b/time64.c @@ -269,6 +269,8 @@ static int S_safe_year(Year year) static void S_copy_little_tm_to_big_TM(const struct tm *src, struct TM *dest) { + assert(src); + assert(dest); #ifdef USE_TM64 dest->tm_sec = src->tm_sec; dest->tm_min = src->tm_min; -- cgit v1.2.1