qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Riku Voipio <riku.voipio@iki.fi>,
	Claudio Fontana <claudio.fontana@huawei.com>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: Allow getdents to be provided by getdents64
Date: Mon, 03 Jun 2013 08:58:41 -0700	[thread overview]
Message-ID: <51ACBD31.70100@twiddle.net> (raw)
In-Reply-To: <CAFEAcA_n7hqrjSSH4X_P+QfC9PxztUEAwbJByFEXm_Tos7VE+g@mail.gmail.com>

On 06/03/2013 08:45 AM, Peter Maydell wrote:
>>> >> +                    /* The target_dirent type is in what was formerly a padding
>>> >> +                     * byte at the end of the structure:
>>> >> +                     */
>>> >> +                    *(((char *)tde) + treclen - 1) = type;
>> >
>> > Maybe easier to read as
>> >
>> >   ((char *)tde)[treclen - 1] = type
>> >
>> > ?
> Dunno. It's not actually a char array, so I kind of prefer
> to use plain pointer arithmetic for this kind of thing.

Then drop the unnecessary parenthesis

  *((char *)tde + trelen - 1) = type;

?


r~

  reply	other threads:[~2013-06-03 15:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 17:10 [Qemu-devel] [PATCH] linux-user: Allow getdents to be provided by getdents64 Peter Maydell
2013-06-03 15:15 ` Richard Henderson
2013-06-03 15:45   ` Peter Maydell
2013-06-03 15:58     ` Richard Henderson [this message]
2013-06-03 16:17       ` Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2013-06-03 11:11 Laurent Vivier
2013-06-03 11:28 ` Peter Maydell
2013-06-03 11:50   ` Laurent Vivier

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=51ACBD31.70100@twiddle.net \
    --to=rth@twiddle.net \
    --cc=claudio.fontana@huawei.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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).