All of lore.kernel.org
 help / color / mirror / Atom feed
* sizeof (struct tYpO *) : it is just a typo or rather a bug ?
@ 2014-07-24 18:20 ` Toralf Förster
  0 siblings, 0 replies; 17+ messages in thread
From: Toralf Förster @ 2014-07-24 18:20 UTC (permalink / raw)
  To: linux-ia64, ceph-devel; +Cc: Linux Kernel

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-07-29  5:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-24 18:20 sizeof (struct tYpO *) : it is just a typo or rather a bug ? Toralf Förster
2014-07-24 18:20 ` Toralf Förster
2014-07-24 18:33 ` Ilya Dryomov
2014-07-24 18:33   ` Ilya Dryomov
2014-07-24 18:33   ` Ilya Dryomov
2014-07-24 18:37   ` Toralf Förster
2014-07-24 18:37     ` Toralf Förster
2014-07-24 18:37     ` Toralf Förster
2014-07-25 11:20 ` Henrique de Moraes Holschuh
2014-07-25 11:20   ` Henrique de Moraes Holschuh
2014-07-25 11:20   ` Henrique de Moraes Holschuh
2014-07-28 17:21   ` [Cocci] Fwd: " Toralf Förster
2014-07-28 20:13     ` Julia Lawall
2014-07-28 20:41       ` Toralf Förster
2014-07-28 20:50         ` Julia Lawall
2014-07-28 21:20           ` Toralf Förster
2014-07-29  5:49             ` Julia Lawall

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.