summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-06 12:49:09 +0100
committerVolker Lendecke <vl@samba.org>2009-12-06 13:07:04 +0100
commit449045e75d7920b7bb20f8445aadff783ddbfd0c (patch)
tree670097c84feef7cc0602ec0c66fba3f9392a6c4d
parentaef303f83c2bdebbd3bf64d8c3ed4b2621232ccb (diff)
downloadsamba-449045e75d7920b7bb20f8445aadff783ddbfd0c.tar.gz
samba-449045e75d7920b7bb20f8445aadff783ddbfd0c.tar.bz2
samba-449045e75d7920b7bb20f8445aadff783ddbfd0c.zip
s3: Simplify usr_info_cmp by calling timeval_compare()
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index b3bfe80200..8a8551cc24 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -53,9 +53,7 @@ static int usr_info_cmp(const void *p1, const void *p2)
/* Called from qsort to compare two users in a usrinfo_t array for
* sorting by login time. Return >0 if usr1 login time was later than
* usr2 login time, <0 if it was earlier */
- return ((usr1->login_time.tv_sec == usr2->login_time.tv_sec)
- ? usr1->login_time.tv_usec - usr2->login_time.tv_usec
- : usr1->login_time.tv_sec - usr2->login_time.tv_sec);
+ return timeval_compare(&usr1->login_time, &usr2->login_time);
}
/*******************************************************************