From: David Miller <davem@davemloft.net>
To: colin.king@canonical.com
Cc: jhansen@vmware.com, aditr@vmware.com, julia.lawall@lip6.fr,
stefanha@redhat.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VSOCK: remove unnecessary ternary operator on return value
Date: Tue, 28 Mar 2017 21:49:58 -0700 (PDT) [thread overview]
Message-ID: <20170328.214958.1031055485189943869.davem@davemloft.net> (raw)
In-Reply-To: <20170328155424.22873-1-colin.king@canonical.com>
From: Colin King <colin.king@canonical.com>
Date: Tue, 28 Mar 2017 16:54:24 +0100
> 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 set ret to
> be the -ve errno value.
>
> Detected by CoverityScan, CID#986649 ("Logically Dead Code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Just return the error directly instead of having this variable.
Thanks.
prev parent reply other threads:[~2017-03-29 4:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 15:54 [PATCH] VSOCK: remove unnecessary ternary operator on return value Colin King
2017-03-28 16:04 ` walter harms
2017-03-29 4:49 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170328.214958.1031055485189943869.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aditr@vmware.com \
--cc=colin.king@canonical.com \
--cc=jhansen@vmware.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).