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:
22c985d
)
Use sizeof instead of hard-coded array size
author
Karl Williamson
<khw@khw-desktop.(none)>
Thu, 14 Jan 2010 23:02:14 +0000
(16:02 -0700)
committer
Craig A. Berry
<craigberry@mac.com>
Sat, 29 May 2010 15:40:17 +0000
(10:40 -0500)
The array should be declared with its actual size.
universal.c
patch
|
blob
|
blame
|
history
diff --git
a/universal.c
b/universal.c
index
27783ac
..
dec8505
100644
(file)
--- a/
universal.c
+++ b/
universal.c
@@
-1175,7
+1175,7
@@
XS(XS_re_regexp_pattern)
/* Houston, we have a regex! */
SV *pattern;
STRLEN left = 0;
- char reflags[
6
];
+ char reflags[
sizeof(INT_PAT_MODS)
];
if ( GIMME_V == G_ARRAY ) {
/*