lkml.org 
[lkml]   [2017]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][V2] VSOCK: remove unnecessary ternary operator on return value
On Wed, Mar 29, 2017 at 04:33:55PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Rather than assign the positive errno values to ret and then
> checking if it is positive and flip the sign, just return the
> errno value.
>
> Detected by CoverityScan, CID#986649 ("Logically Dead Code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> net/vmw_vsock/vmci_transport.c | 22 +++++++---------------
> 1 file changed, 7 insertions(+), 15 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-03-29 20:37    [W:0.056 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site