develooper Front page | perl.perl5.porters | Postings from April 2006

[PATCH] update to pp_complement() via Coverity

Thread Next
From:
andy
Date:
April 15, 2006 22:15
Subject:
[PATCH] update to pp_complement() via Coverity
Message ID:
20060416051423.GA17063@petdance.com
Coverity gets confused because we in pp_complement() we misuse pointers.
We allocate a base pointer, then increment that pointer and walk through
the string, and then decrement it back to the original.

In my patch, I use a temp pointer to walk through the string, which lets
us not have to decrement it.  And I assume it'll make Coverity happier.

And I was able to localize some variables, too.

I really think we need to take Coverity more seriously.  In this case,
what it found wasn't a bug, but was certainly bad practice.

xoxo,
Andy

-- 
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About