On Mon, Dec 19, 2016 at 12:43:49PM +0100, Sven Eckelmann wrote:
On Montag, 19. Dezember 2016 12:37:43 CET Sven Eckelmann wrote:
I was not talking about the packing functions.
Just read my initial mails. Looks like I've copied the wrong function name "batadv_tvlv_ogm_pack_ctx". But I was talking about the parameter in of "batadv_tvlv_containers_process2". So I am the reason for the confusion :)
Just to check, you suggest removing this line: https://git.open-mesh.org/batman-adv.git/blob/1ddd189528fc332bf286ffd56b629d...
And to replace the passing of "ctx" with an "orig_node" here: https://git.open-mesh.org/batman-adv.git/blob/1ddd189528fc332bf286ffd56b629d...
(which works as a "void *" parameter accepts any type, without the need of casting explicitly)
If that's what you mean, hm, not sure. Feels dangerous, such automatic casting, doesn't it?
I'm really wondering whether I should go for the approach of hiding the "void *" in a new type. And only having the "void *" fiddeling inside _pack()/_unpack() functions.