[hipl-dev] Re: [Merge] lp:~diego-biurrun/hipl/hipfw-performance into lp:hipl

  • From: Christof Mroz <christof.mroz@xxxxxxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Wed, 12 Jan 2011 04:33:02 +0100

On Tue, 11 Jan 2011 09:52:57 +0100, Stefan Götz <stefan.goetz@xxxxxxxxxxxxxxxxx> wrote:


Hm, but doesn't that mean that this branch is not ready for a merge proposal, anyway?

I'd rather mark it as "ready to test" and "I'm done looking for policy violations" (believe it or not :), maybe a branch proposal was too heavy an abuse. I'll just write a mail to the list next time, instead. Until re-synchro with trunk, none of the above apply of course.

Exactly. Precisely *because* the 'data' member is of type void*, you can assign its value to the variable 'conn' without a cast.

Aight, didn't know that. (Fun fact: in C++ it's mandatory to cast from void* to something, but not the other way around. Of course, new/delete and templates are preferred in this case, so it's actually a useful reminder that you're doing something wrong).

=== modified file 'hipd/hiprelay.c'
--- hipd/hiprelay.c    2010-11-30 14:50:30 +0000
+++ hipd/hiprelay.c    2010-12-13 21:28:35 +0000
@@ -1015,16 +1015,16 @@
  *
  * @param r the HIP control message to be relayed
  * @param type_hdr message type
- * @param r_saddr the original source address
- * @param r_daddr the original destination address
+ * @param r_saddr (unused) the original source address
+ * @param r_daddr (unused) the original destination address

[M] what is the point of adding unused function arguments to an already
crowded signature?

For debug purposes. Touching the function body would be out of the scope of this
branch (even this doc change was, sorry).

I'm not quite following. So if they are necessary for debug purposes, why are they unused? Aren't they 'used for debugging'?

Just noting that while these parameters seem important, they actually have no impact on the function.

Other related posts: