diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2013-01-17 10:34:33 -0500 |
---|---|---|
committer | Andy Dougherty <doughera@lafayette.edu> | 2013-01-17 10:34:33 -0500 |
commit | 606599e1b75bd972167796e8a3f88a7821d3d8c6 (patch) | |
tree | 6f2e6c6be18e5695b47a0774b6fbc8f85c7bce25 /time64.c | |
parent | 55971e212352fca42631e1c6c7cadd0eb3affbd0 (diff) | |
download | perl-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |