From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Andrew Morton <akpm@osdl.org>
Cc: hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] freevxfs: minor cleanups
Date: Wed, 29 Jun 2005 07:20:21 +0300 [thread overview]
Message-ID: <1120018821.9658.4.camel@localhost> (raw)
In-Reply-To: <20050628163114.6594e1e1.akpm@osdl.org>
Hi,
On Tue, 2005-06-28 at 16:31 -0700, Andrew Morton wrote:
> That struct initialisation:
>
> > + *infp = (struct vxfs_sb_info) {
> > + .vsi_raw = rsbp,
> > + .vsi_bp = bp,
> > + .vsi_oltext = rsbp->vs_oltext[0],
> > + .vsi_oltsize = rsbp->vs_oltsize,
> > + };
>
> Is a bit unconventional, but it doesn't alter the size of the .o file, so
> whatever.
The rationale for this is that since NULL is not guaranteed to be zero
by the C standard, memset() doesn't really initialize pointers properly.
The above does. This came up when I wanted to replace explicit NULL
assignments from the NTFS code with kcalloc() and the maintainer
refused. Al Viro suggested the above form and was accepted by the NTFS
maintainer as well.
Pekka
next prev parent reply other threads:[~2005-06-29 4:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <iit0gm.lxobpl.5z2b9jduhy9fvx6tjxrco46v4.refire@cs.helsinki.fi>
2005-06-28 23:28 ` [PATCH 1/3] freevxfs: fix buffer_head leak Andrew Morton
2005-06-29 4:25 ` Pekka Enberg
2005-06-29 7:10 ` Christoph Hellwig
2005-06-29 7:21 ` Andrew Morton
[not found] ` <iit0h1.q7pnex.bkir3xysppdufw6d9h65boz37.refire@cs.helsinki.fi>
2005-06-28 23:31 ` [PATCH 2/3] freevxfs: minor cleanups Andrew Morton
2005-06-29 4:20 ` Pekka Enberg [this message]
2005-06-29 7:08 ` Christoph Hellwig
2005-06-29 7:42 ` Pekka J Enberg
2005-06-29 7:50 ` Christoph Hellwig
2005-06-29 7:32 ` [PATCH 2/3] " Matthias Urlichs
2005-06-29 7:58 ` Pekka Enberg
2005-06-29 7:07 ` Christoph Hellwig
2005-06-29 7:17 ` Andrew Morton
2005-06-29 7:21 ` Christoph Hellwig
2005-06-29 7:39 ` Matthias Urlichs
2005-06-29 7:51 ` Pekka J Enberg
2005-06-29 10:23 ` Roman Zippel
[not found] ` <iit0hc.owmgrf.a8mlfisjmja2ab31fpl1ysmkp.refire@cs.helsinki.fi>
2005-06-28 23:33 ` [PATCH 3/3] freevxfs: remove 2.4 compatability Andrew Morton
2005-06-29 7:07 ` Christoph Hellwig
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=1120018821.9658.4.camel@localhost \
--to=penberg@cs.helsinki.fi \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.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 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.