Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1218538
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT] Networking |
| Date | 2015-09-03 21:50 +0200 |
| Message-ID | <q4IGe-4OA-1@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <q4FS3-M8-27@gated-at.bofh.it> <q4GO6-28h-25@gated-at.bofh.it> <q4HqO-37a-19@gated-at.bofh.it> <q4HAu-3ib-17@gated-at.bofh.it> <q4Iwy-4D6-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Sep 3, 2015 at 12:32 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
> I find 518 occurrences of a function parameter declaration that contains
> an explicit size. But only the sizeof(mcs_mask) where there is a sizeof
> on such a parameter. I also checked for ARRAY_SIZE on such parameters,
> and didn't find any occurrences of that either.
Are there any cases of multi-dimensional arrays? Because those
actually have semantic meaning outside of sizeof(), just in things
like adding offsets.
Eg something like
int fn(int a[][10])
ends up being equivalent to something like
int fn(int (*a)[10])
and "a+1" is actually 40 bytes ahead of "a", so it does *not* act like
an "int *".
(And I might have screwed that up mightily - C multidimensional arrays
and the conversions to pointers are really easy to get confused about.
Which is why I hope we don't have them)
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [GIT] Networking Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-03 18:50 +0200
Re: [GIT] Networking David Miller <davem@davemloft.net> - 2015-09-03 19:50 +0200
Re: [GIT] Networking Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-03 20:30 +0200
Re: [GIT] Networking Joe Perches <joe@perches.com> - 2015-09-03 20:40 +0200
Re: [GIT] Networking Julia Lawall <julia.lawall@lip6.fr> - 2015-09-03 21:40 +0200
Re: [GIT] Networking Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-03 21:50 +0200
Re: [GIT] Networking Julia Lawall <julia.lawall@lip6.fr> - 2015-09-03 23:00 +0200
Re: [GIT] Networking Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-03 23:10 +0200
Re: [GIT] Networking Julia Lawall <julia.lawall@lip6.fr> - 2015-09-03 23:30 +0200
Re: [GIT] Networking Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-03 20:40 +0200
Re: [GIT] Networking Marcel Holtmann <marcel@holtmann.org> - 2015-09-03 23:10 +0200
RE: [GIT] Networking David Laight <David.Laight@ACULAB.COM> - 2015-09-04 11:10 +0200
Re: [GIT] Networking "Rustad, Mark D" <mark.d.rustad@intel.com> - 2015-09-04 19:40 +0200
Re: [GIT] Networking David Miller <davem@davemloft.net> - 2015-09-03 20:50 +0200
Re: [GIT] Networking Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> - 2015-09-05 18:20 +0200
csiph-web