History

net: decnet: use time_is_before_jiffies() instead of open coding it

Use the helper function time_is_{before,after}_jiffies() to improve code readability.

Wang Qing committed 4 years ago

Commit 98fffd71 parent b7eb7f61 file · +2 −1Browse files

Unified · Split

net/decnet/dn_nsp_out.c+2−1
@@ -52,6 +52,7 @@ · 51 unmodified lines
5252 #include <linux/init.h>
5353 #include <linux/poll.h>
5454 #include <linux/if_packet.h>
55+#include <linux/jiffies.h>
5556 #include <net/neighbour.h>
5657 #include <net/dst.h>
5758 #include <net/flow.h>
@@ -351,7 +352,7 @@ void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, · 293 unmodified lines
351352 * Slow start: If we have been idle for more than
352353 * one RTT, then reset window to min size.
353354 */
354− if ((jiffies - scp->stamp) > t)
355+ if (time_is_before_jiffies(scp->stamp + t))
355356 scp->snd_window = NSP_MIN_WINDOW;
356357
357358 if (oth)