Page MenuHomeFreeBSD

Missing "else" in cascaded condition (if)
ClosedPublic

Authored by danfe on May 24 2019, 9:18 AM.

Details

Summary

PVS Studio reported error: V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing in two device drivers. Consider attached patch that fixes it.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I tend to think that neither of these is actually a problem, since in both cases, if the "if" is taken, we return or jump. But the fix seems harmless.

BTW, when uploading patches if not using arcanist, please provide full context. You can do that in git with diff -U9999999 (this is what I do, I don't care for the arcanist stuff).

This revision is now accepted and ready to land.May 24 2019, 1:13 PM

Thanks; since I'm not an src committer, I'd wait for at least another LGTM review.

I'll remember to do a full context diff next time, once I figure out how to do that with Subversion (I'm not sure why people often suggest Git commands in FreeBSD context).

The changes seem correct.
I don't think a simple phabricator acceptance from a committer is suficient approval for a non src committer though, so I hereby explicitly approve it.

I'll remember to do a full context diff next time, once I figure out how to do that with Subversion (I'm not sure why people often suggest Git commands in FreeBSD context).

It's mentioned in https://wiki.freebsd.org/Phabricator#Create_a_Revision_via_Web_Interface

This revision was automatically updated to reflect the committed changes.