From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] 9pfs-proxy: -retval vs errno vs -1
Date: Fri, 06 Mar 2015 11:22:56 +0530 [thread overview]
Message-ID: <87ioeesmdj.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <54F7786F.2020409@msgid.tls.msk.ru>
Michael Tokarev <mjt@tls.msk.ru> writes:
> Another interesting tidbit is in hw/9pfs/virtio-9p-proxy.c.
>
> All filesystem methods use common v9fs_request() function,
> which returns -errno. So far so good.
>
> Now, *all* places which call this function, does this:
>
> retval = v9fs_request(...);
> if (retval < 0) {
> errno = -retval;
> }
> return retval;
>
> and *some* does this:
>
> retval = v9fs_request(...);
> if (retval < 0) {
> errno = -retval;
> retval = -1;
> }
> return retval;
We should be able to drop that retval = -1;
-aneesh
prev parent reply other threads:[~2015-03-06 5:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 21:26 [Qemu-devel] 9pfs-proxy: -retval vs errno vs -1 Michael Tokarev
2015-03-06 5:52 ` Aneesh Kumar K.V [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=87ioeesmdj.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=aliguori@amazon.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
/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).