This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
assert(*p = '#'); /* Spot the oops. */
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 27 Jun 2014 23:35:31 +0000 (19:35 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 27 Jun 2014 23:35:31 +0000 (19:35 -0400)
Triggered new Coverity perl5 CIDs 68580, 68581 and 68583.
(Side effect in assertion, and assignment where comparison
probably indented, the last twice because of ext/re.)

regcomp.c

index cea37bf..a6979d7 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -15029,7 +15029,7 @@ S_reg_skipcomment(RExC_state_t *pRExC_state, char* p)
 {
     PERL_ARGS_ASSERT_REG_SKIPCOMMENT;
 
-    assert(*p = '#');
+    assert(*p == '#');
 
     while (p < RExC_end) {
         if (*(++p) == '\n') {