Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH 06/17: compctl: Remove pointless check



On Tue, Jan 6, 2015 at 8:53 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jan 6,  6:25am, Mikael Magnusson wrote:
> } Subject: PATCH 06/17: compctl: Remove pointless check
> }
> } cc has already been derefed a bunch of times leading up to here. Found
> } by Coverity (Issue 1255841).
> } -    if (cc && cc->xor) {
> } +    if (cc->xor) {
>
> I'm curious, why bother to "fix" this (and a couple of similar others in
> later patches in this series)?  It's not *wrong*, and the change is not
> a significant optimization.

It's similar effort to just fix the code or to mark it as a false
positive in coverity, and fixing it makes the code less confusing to
look at as well, so I went with the patches.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author