(DATE_INIT): Bugfix. Several fields in
struct pd_date are used regardless of .mask, so it is better to zero out the entire structure.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -128,7 +128,7 @@ struct pd_date | ... | @@ -128,7 +128,7 @@ struct pd_date |
128 | int ordinal; | 128 | int ordinal; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | #define DATE_INIT(date) date.mask = 0 | 131 | #define DATE_INIT(date) memset(&(date), 0, sizeof(date)) |
132 | #define DATE_SET(date, memb, m, val) \ | 132 | #define DATE_SET(date, memb, m, val) \ |
133 | do { date . memb = val; date.mask |= m; } while (0) | 133 | do { date . memb = val; date.mask |= m; } while (0) |
134 | 134 | ... | ... |
-
Please register or sign in to post a comment