svn commit: samba r24941 - in branches/SAMBA_4_0/source: dsdb/samdb
lib/util
abartlet at samba.org
abartlet at samba.org
Tue Sep 4 02:08:38 GMT 2007
Author: abartlet
Date: 2007-09-04 02:08:36 +0000 (Tue, 04 Sep 2007)
New Revision: 24941
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24941
Log:
Simplify samdb_result_nttime(), and remove nttime_from_string()
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
branches/SAMBA_4_0/source/lib/util/time.c
Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c 2007-09-04 01:08:39 UTC (rev 24940)
+++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c 2007-09-04 02:08:36 UTC (rev 24941)
@@ -449,9 +449,7 @@
*/
NTTIME samdb_result_nttime(struct ldb_message *msg, const char *attr, NTTIME default_value)
{
- const char *str = ldb_msg_find_attr_as_string(msg, attr, NULL);
- if (!str) return default_value;
- return nttime_from_string(str);
+ return ldb_msg_find_attr_as_uint64(msg, attr, default_value);
}
/*
Modified: branches/SAMBA_4_0/source/lib/util/time.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/time.c 2007-09-04 01:08:39 UTC (rev 24940)
+++ branches/SAMBA_4_0/source/lib/util/time.c 2007-09-04 02:08:36 UTC (rev 24941)
@@ -374,14 +374,6 @@
}
/**
- parse a nttime as a large integer in a string and return a NTTIME
-*/
-_PUBLIC_ NTTIME nttime_from_string(const char *s)
-{
- return strtoull(s, NULL, 0);
-}
-
-/**
return (tv1 - tv2) in microseconds
*/
_PUBLIC_ int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2)
More information about the samba-cvs
mailing list