From: Karl Williamson Date: Thu, 14 Jan 2010 23:02:14 +0000 (-0700) Subject: Use sizeof instead of hard-coded array size X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=525aa6214fa98872c8e7604a6b63bd6c7914f3a4;p=p5sagit%2Fp5-mst-13.2.git Use sizeof instead of hard-coded array size The array should be declared with its actual size. --- diff --git a/universal.c b/universal.c index 27783ac..dec8505 100644 --- 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 ) { /*