From: Andreas Schwab <schwab@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Steven Whitehouse <swhiteho@redhat.com>,
Jan Engelhardt <jengelh@linux01.gwdg.de>,
linux-kernel@vger.kernel.org,
Russell Cattelan <cattelan@redhat.com>,
David Teigland <teigland@redhat.com>,
hch@infradead.org
Subject: Re: [PATCH 07/16] GFS2: Directory handling
Date: Tue, 05 Sep 2006 10:58:07 +0200 [thread overview]
Message-ID: <je3bb6zo4g.fsf@sykes.suse.de> (raw)
In-Reply-To: <20060905084334.GA16788@elte.hu> (Ingo Molnar's message of "Tue, 5 Sep 2006 10:43:34 +0200")
Ingo Molnar <mingo@elte.hu> writes:
> * Steven Whitehouse <swhiteho@redhat.com> wrote:
>
>> > >+static inline int __gfs2_dirent_find(const struct gfs2_dirent *dent,
>> > >+ const struct qstr *name, int ret)
>> > >+{
>> > >+ if (dent->de_inum.no_addr != 0 &&
>> > >+ be32_to_cpu(dent->de_hash) == name->hash &&
>> > >+ be16_to_cpu(dent->de_name_len) == name->len &&
>> > >+ memcmp((char *)(dent+1), name->name, name->len) == 0)
>> >
>> > Nocast.
>> >
>> ok
>
> actually, sizeof(*dent) != 1, so how can a non-casted memcmp be correct
> here?
How can the cast change anything?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2006-09-05 8:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 13:34 [PATCH 07/16] GFS2: Directory handling Steven Whitehouse
2006-09-04 11:35 ` Jan Engelhardt
2006-09-05 8:44 ` Steven Whitehouse
2006-09-05 8:43 ` Ingo Molnar
2006-09-05 8:58 ` Andreas Schwab [this message]
2006-09-05 10:58 ` Ingo Molnar
2006-09-05 9:22 ` Jan Engelhardt
2006-09-05 11:19 ` Ingo Molnar
2006-09-05 11:22 ` Ingo Molnar
2006-09-05 14:02 ` Steven Whitehouse
-- strict thread matches above, loose matches on Subject: below --
2006-04-21 16:16 Steven Whitehouse
2006-04-21 16:16 ` Christoph Hellwig
2006-04-24 9:16 ` Steven Whitehouse
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=je3bb6zo4g.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=cattelan@redhat.com \
--cc=hch@infradead.org \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=swhiteho@redhat.com \
--cc=teigland@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.