summaryrefslogtreecommitdiff
path: root/time64.c
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2013-01-17 10:34:33 -0500
committerAndy Dougherty <doughera@lafayette.edu>2013-01-17 10:34:33 -0500
commit606599e1b75bd972167796e8a3f88a7821d3d8c6 (patch)
tree6f2e6c6be18e5695b47a0774b6fbc8f85c7bce25 /time64.c
parent55971e212352fca42631e1c6c7cadd0eb3affbd0 (diff)
downloadperl-606599e1b75bd972167796e8a3f88a7821d3d8c6.tar.gz
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.)
Diffstat (limited to 'time64.c')
-rw-r--r--time64.c2
1 files changed, 2 insertions, 0 deletions
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;