RE: [GIT] Networking

David Laight
2015-09-04T09:07:52Z

> I find them useful as syntactic sugar. We have not used them a lot, but there are cases in our crypto
> handling code where we have fixed size array inputs/outputs and there we opted to use them. They make
> it easy to remember what the expected sizes of input and output are without having to read through the
> implementation (of course we never even tried to use sizeof on these pointers).
>
> static int smp_ah(struct crypto_blkcipher *tfm, const u8 irk[16],
> const u8 r[3], u8 res[3])

Expect that it looks like you are passing arrays by value,
but instead you are passing by reference.

Explicitly pass by reference and sizeof works.
The object code will be the same.

David