Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c1557a

Browse files
author
Thomas G. Lockhart
committed
Fix occasional uninitialized variable fractional seconds
in DecodeTimeOnly(). Only present when seconds are not specified for input.
1 parent 9f99e4c commit 2c1557a

File tree

1 file changed

+3
-3
lines changed
  • src/backend/utils/adt

1 file changed

+3
-3
lines changed

src/backend/utils/adt/dt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.42 1997/10/17 05:36:01 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.43 1997/10/25 05:18:17 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -3112,8 +3112,8 @@ DecodeTimeOnly(char *field[], int ftype[], int nf, int *dtype, struct tm * tm, d
31123112
tm->tm_hour = 0;
31133113
tm->tm_min = 0;
31143114
tm->tm_sec = 0;
3115-
tm->tm_isdst = -1; /* don't know daylight savings time status
3116-
* apriori */
3115+
tm->tm_isdst = -1; /* don't know daylight savings time status apriori */
3116+
*fsec = 0;
31173117

31183118
fmask = DTK_DATE_M;
31193119

0 commit comments

Comments
 (0)