From: green Date: Sun, 25 Feb 2007 22:51:00 +0000 (+0000) Subject: b=11028 X-Git-Tag: v1_7_100~300 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0ebd182186d09eecfee0660d8a3b8d31d75fb23f;p=fs%2Flustre-release.git b=11028 r=adilger Fix cfs_timeval_sub to properly fill struct timeval. Correctly assign microseconds to microsecondsand seconds to seconds. --- diff --git a/lnet/include/libcfs/libcfs.h b/lnet/include/libcfs/libcfs.h index 8ac781b..a4127bf 100644 --- a/lnet/include/libcfs/libcfs.h +++ b/lnet/include/libcfs/libcfs.h @@ -419,8 +419,8 @@ static inline long cfs_timeval_sub(struct timeval *large, struct timeval *small, (large->tv_sec - small->tv_sec) * ONE_MILLION + (large->tv_usec - small->tv_usec)); if (result != NULL) { - result->tv_usec = r / ONE_MILLION; - result->tv_sec = r; + result->tv_usec = r % ONE_MILLION; + result->tv_sec = r / ONE_MILLION; } return r; }