summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2012-02-14 09:17:02 +0100
committerH.Merijn Brand <h.m.brand@xs4all.nl>2012-02-14 09:17:02 +0100
commit28c8e5e38346920e93159862a479a40934c18c54 (patch)
tree9d3ff35644dd25705f67f428529d22bf988b910f /ext
parenta58a85fab78d767203f1dac26cbf0717d0c47e87 (diff)
downloadperl-28c8e5e38346920e93159862a479a40934c18c54.tar.gz
mixing declarations and assignments not allowed in C89
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 34e712ed56..945c34564f 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1969,9 +1969,10 @@ strptime(str, fmt, sec=-1, min=-1, hour=-1, mday=-1, mon=-1, year=-1, wday=-1, y
if(tm.tm_mday > -1 && tm.tm_mon > -1 && tm.tm_year > -1) {
/* if we leave sec/min/hour == -1, then these will be
* normalised to the previous day */
- int was_sec = tm.tm_sec; tm.tm_sec = 0;
- int was_min = tm.tm_min; tm.tm_min = 0;
- int was_hour = tm.tm_hour; tm.tm_hour = 0;
+ int was_sec, was_min, was_hour;
+ was_sec = tm.tm_sec; tm.tm_sec = 0;
+ was_min = tm.tm_min; tm.tm_min = 0;
+ was_hour = tm.tm_hour; tm.tm_hour = 0;
if(mktime(&tm) == (time_t)-1)
XSRETURN(0);