This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bda3df
)
Fix the overflow warning to just check for an error.
author
Michael G Schwern
<schwern@pobox.com>
Sun, 14 Sep 2008 21:57:07 +0000
(14:57 -0700)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Sat, 3 Jan 2009 17:37:12 +0000
(18:37 +0100)
Fix the overflow warning to identify the right op.
pp_sys.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_sys.c
b/pp_sys.c
index
1e445da
..
ad39804
100644
(file)
--- a/
pp_sys.c
+++ b/
pp_sys.c
@@
-4470,9
+4470,11
@@
PP(pp_gmtime)
else
err = gmtime64_r(&when, &tmbuf);
- if( (tmbuf.tm_year + 1900) < 0 )
+ if( err == NULL ) {
+ char *opname = PL_op->op_type == OP_LOCALTIME ? "localtime" : "gmtime";
Perl_warner(aTHX_ packWARN(WARN_OVERFLOW),
- "local/gmtime under/overflowed the year");
+ "%s under/overflowed the year", opname);
+ }
if (GIMME != G_ARRAY) { /* scalar context */
SV *tsv;