diff options
author | Georg Brandl <georg@python.org> | 2014-10-12 06:45:15 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-12 06:45:15 (GMT) |
commit | e1a7d9dbf51fa16635d09cf23cc912a97f3e32dc (patch) | |
tree | 6279fac3818c2d7926aa91685ef44ce83e4d3a42 /Modules/posixmodule.c | |
parent | 6b04dc9bcc3f87d6ec5d298b49f2fa7644356c37 (diff) | |
download | cpython-e1a7d9dbf51fa16635d09cf23cc912a97f3e32dc.zip cpython-e1a7d9dbf51fa16635d09cf23cc912a97f3e32dc.tar.gz cpython-e1a7d9dbf51fa16635d09cf23cc912a97f3e32dc.tar.bz2 |
Closes #22568: fix UTIME_TO_* macros in posixmodule for rare cases.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 22770e8..e1e5af9 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -4714,25 +4714,25 @@ typedef struct { } \ #define UTIME_TO_UTIMBUF \ - struct utimbuf u[2]; \ + struct utimbuf u; \ struct utimbuf *time; \ if (ut->now) \ time = NULL; \ else { \ - u[0].actime = ut->atime_s; \ - u[0].modtime = ut->mtime_s; \ - time = u; \ + u.actime = ut->atime_s; \ + u.modtime = ut->mtime_s; \ + time = &u; \ } #define UTIME_TO_TIME_T \ time_t timet[2]; \ - struct timet time; \ + time_t *time; \ if (ut->now) \ time = NULL; \ else { \ timet[0] = ut->atime_s; \ timet[1] = ut->mtime_s; \ - time = &timet; \ + time = timet; \ } \ |