Menu

#34 TIME_DUE not correctly defined

open
core-olsrd (19)
5
2009-02-10
2009-02-10
Anonymous
No

Hi people, I think that the macro TIME_DUE is not correctly defined, here is the definition in defs.h file.

/* Compute the time in milliseconds when a timestamp will expire. */
#define TIME_DUE(s1) ((int)((s1) * olsr_cnf->system_tick_divider) - now_times)

If parameter s1 is supposed to be a timestamp the correct definition should be:
#define TIME_DUE(s1) ((int)((s1 - now_times) * olsr_cnf->system_tick_divider))

With the previous definition parameter s1 is passed from a timestamp to milliseconds and then substracted now_times which is a timestamp number!

Best Regards, Pedro.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB