From: "Toralf Förster" <toralf.foerster@gmx.de>
To: linux-ia64@vger.kernel.org, ceph-devel@vger.kernel.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: sizeof (struct tYpO *) : it is just a typo or rather a bug ?
Date: Thu, 24 Jul 2014 20:20:16 +0200 [thread overview]
Message-ID: <53D14E60.1010105@gmx.de> (raw)
Inspired by this "typo" fix
http://article.gmane.org/gmane.linux.kernel/1754640
I grep'ed the current git tree of linus for similar issues.
For these 4 places I'm wondering where the appropriate struct definition is located :
arch/ia64/sn/kernel/io_acpi_init.c: sizeof(struct pci_devdev_info *)) {
tools/perf/builtin-sched.c: sched->tasks = realloc(sched->tasks, sched->nr_tasks * sizeof(struct task_task *));
fs/ceph/xattr.c: xattrs = kcalloc(numattr, sizeof(struct ceph_xattr *),
fs/ceph/xattr.c: memset(xattrs, 0, numattr*sizeof(struct ceph_xattr *));
Nevertheless I was told, that gcc doesn't complain about such things due to eventually evaluating it to "sizeof(null)". I'm however curious if at least a warning should be emitted in such a case, or?
--
Toralf
next reply other threads:[~2014-07-24 18:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 18:20 Toralf Förster [this message]
2014-07-24 18:33 ` sizeof (struct tYpO *) : it is just a typo or rather a bug ? Ilya Dryomov
2014-07-24 18:37 ` Toralf Förster
2014-07-25 11:20 ` Henrique de Moraes Holschuh
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=53D14E60.1010105@gmx.de \
--to=toralf.foerster@gmx.de \
--cc=ceph-devel@vger.kernel.org \
--cc=linux-ia64@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox