|
@@ -194,8 +194,11 @@ static inline int compare_eth(const void *data1, const void *data2)
|
|
|
* - before adding more than 127 to the starting value - it is a predecessor,
|
|
|
* - when adding 128 - it is neither a predecessor nor a successor,
|
|
|
* - after adding more than 127 to the starting value - it is a successor */
|
|
|
-#define seq_before(x, y) ({typeof(x) _dummy = (x - y); \
|
|
|
- _dummy > smallest_signed_int(_dummy); })
|
|
|
+#define seq_before(x, y) ({typeof(x) _d1 = (x); \
|
|
|
+ typeof(y) _d2 = (y); \
|
|
|
+ typeof(x) _dummy = (_d1 - _d2); \
|
|
|
+ (void) (&_d1 == &_d2); \
|
|
|
+ _dummy > smallest_signed_int(_dummy); })
|
|
|
#define seq_after(x, y) seq_before(y, x)
|
|
|
|
|
|
#endif /* _NET_BATMAN_ADV_MAIN_H_ */
|