PVS V501: redundant checks

There are some more in telnetd and agg but I'm not sure if they are
intentional, the code is so ugly there.

Change-Id: I9cc2bf8a919c3b1d6c68f2ded8622730497b0f91
Reviewed-on: https://review.haiku-os.org/c/1598
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This commit is contained in:
Adrien Destugues 2019-07-16 18:02:54 +02:00 committed by Stephan Aßmus
parent 583c561cb2
commit 16d463ae1d
2 changed files with 2 additions and 3 deletions

View File

@ -179,8 +179,7 @@ BMediaClient::Unbind(BMediaInput* input, BMediaOutput* output)
{ {
CALLED(); CALLED();
if (input == NULL if (input == NULL || output == NULL)
|| input == NULL)
return B_ERROR; return B_ERROR;
if (input->fOwner != this || output->fOwner != this) if (input->fOwner != this || output->fOwner != this)

View File

@ -48,7 +48,7 @@ BitmapManager *gBitmapManager = NULL;
int int
compare_app_pointer(const ServerApp* a, const ServerApp* b) compare_app_pointer(const ServerApp* a, const ServerApp* b)
{ {
return (addr_t)b - (addr_t)b; return (addr_t)a - (addr_t)b;
} }