summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-12-19 03:33:59 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-12-19 03:33:59 +0100
commitee4795884ec145303115ac1bd88878684df46118 (patch)
tree7ee40291580c0cac263dd94e651b6eab15382cfb
parentb2c97e251bb470e6f967c716081675a96dbde59c (diff)
libps: Fix time comparison
* libps/spec.c (ps_cmp_times): Actually compare tv_usec fields of tv1 and tv2.
-rw-r--r--libps/spec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libps/spec.c b/libps/spec.c
index d8188d6b..bfee34ea 100644
--- a/libps/spec.c
+++ b/libps/spec.c
@@ -880,7 +880,7 @@ ps_cmp_times (struct proc_stat *ps1, struct proc_stat *ps2,
tv1.tv_sec > tv2.tv_sec ? 1
: tv1.tv_sec < tv2.tv_sec ? -1
: tv1.tv_usec > tv2.tv_usec ? 1
- : tv2.tv_usec < tv2.tv_usec ? -1
+ : tv1.tv_usec < tv2.tv_usec ? -1
: 0;
}