Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b19ab7f
)
b=11028
author
green
<green>
Sun, 25 Feb 2007 22:51:00 +0000
(22:51 +0000)
committer
green
<green>
Sun, 25 Feb 2007 22:51:00 +0000
(22:51 +0000)
r=adilger
Fix cfs_timeval_sub to properly fill struct timeval.
Correctly assign microseconds to microsecondsand seconds to seconds.
lnet/include/libcfs/libcfs.h
patch
|
blob
|
history
diff --git
a/lnet/include/libcfs/libcfs.h
b/lnet/include/libcfs/libcfs.h
index
8ac781b
..
a4127bf
100644
(file)
--- 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;
}