From 49ff42bef58c0cd1ac50f545641cc099af25992d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 14 Apr 2023 13:06:18 +0200 Subject: core: remove unnecessary condition in comparison of timeval structures Ref: https://github.com/weechat/weechat-relay/pull/3 --- src/core/wee-util.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/core/wee-util.c b/src/core/wee-util.c index e776246f0..40b0545aa 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -259,12 +259,6 @@ util_timeval_diff (struct timeval *tv1, struct timeval *tv2) diff_sec = tv2->tv_sec - tv1->tv_sec; diff_usec = tv2->tv_usec - tv1->tv_usec; - if (diff_usec < 0) - { - diff_usec += 1000000; - diff_sec--; - } - return (diff_sec * 1000000) + diff_usec; } -- cgit v1.2.3