From 16d463ae1dcd5a0486ba47c9aa61595dcbb96e62 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 16 Jul 2019 18:02:54 +0200 Subject: [PATCH] PVS V501: redundant checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/kits/media/experimental/MediaClient.cpp | 3 +-- src/servers/app/BitmapManager.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/kits/media/experimental/MediaClient.cpp b/src/kits/media/experimental/MediaClient.cpp index 3b15b730d3..70fe70702e 100755 --- a/src/kits/media/experimental/MediaClient.cpp +++ b/src/kits/media/experimental/MediaClient.cpp @@ -179,8 +179,7 @@ BMediaClient::Unbind(BMediaInput* input, BMediaOutput* output) { CALLED(); - if (input == NULL - || input == NULL) + if (input == NULL || output == NULL) return B_ERROR; if (input->fOwner != this || output->fOwner != this) diff --git a/src/servers/app/BitmapManager.cpp b/src/servers/app/BitmapManager.cpp index dceaf6bed2..347289748b 100644 --- a/src/servers/app/BitmapManager.cpp +++ b/src/servers/app/BitmapManager.cpp @@ -48,7 +48,7 @@ BitmapManager *gBitmapManager = NULL; int compare_app_pointer(const ServerApp* a, const ServerApp* b) { - return (addr_t)b - (addr_t)b; + return (addr_t)a - (addr_t)b; }