diff options
Diffstat (limited to 'proto/babel/packets.c')
-rw-r--r-- | proto/babel/packets.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/babel/packets.c b/proto/babel/packets.c index d136efe8..6e8d2eb5 100644 --- a/proto/babel/packets.c +++ b/proto/babel/packets.c @@ -162,17 +162,17 @@ bytes_equal(u8 *b1, u8 *b2, uint maxlen) return i; } -static inline u16 +static inline uint get_time16(const void *p) { - u16 v = get_u16(p) / BABEL_TIME_UNITS; - return MAX(1, v); + uint v = get_u16(p) * BABEL_TIME_UNITS; + return MAX(BABEL_MIN_INTERVAL, v); } static inline void -put_time16(void *p, u16 v) +put_time16(void *p, uint v) { - put_u16(p, v * BABEL_TIME_UNITS); + put_u16(p, v / BABEL_TIME_UNITS); } static inline void |