On Sat, Aug 03, 2013 at 11:10:07PM +0200, Simon Wunderlich wrote:
+static bool
batadv_iv_ogm_metric_is_eob(uint32_t metric, uint32_t new_metric)
+{
+ return (metric - new_metric < BATADV_TQ_SIMILARITY_THRESHOLD);
+}
+
Since it's static anyway, maybe call this function
batadv_iv_ogm_metric_is_equiv_or_better instead? eob
if I use batadv_iv_ogm_metric_is_equiv_or_better than I have problems wit hthe
assignment of the ops member later...line toooo long :) This is why I chose that
name.
looks so ... random. :) Also, maybe use
BATADV_IV_TQ_SIMILARITY_THRESHOLD? Although TQ somehow implies
BATADV_IV ...
I don't think it is correct. Metric is separated from the algorithm and and this
define belongs to the metric. In the future we may have B.A.T.M.A.N. X which
wants to use the TQ again..at that point it should (re-)use all the constants we
already have.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara