diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-09-04 02:08:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:40 -0500 |
commit | bb84655d65bf22305cfab26a6b14b148cb060722 (patch) | |
tree | 63bd42820bea6cba8959d7673935f18515d690ee /source4 | |
parent | 166284d9c1f32f249966064256e97b1847ef48d3 (diff) | |
download | samba-bb84655d65bf22305cfab26a6b14b148cb060722.tar.gz samba-bb84655d65bf22305cfab26a6b14b148cb060722.tar.bz2 samba-bb84655d65bf22305cfab26a6b14b148cb060722.zip |
r24941: Simplify samdb_result_nttime(), and remove nttime_from_string()
Andrew Bartlett
(This used to be commit bcd994a139e2e8fb2e97c8b897c987ff234e0b0a)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 4 | ||||
-rw-r--r-- | source4/lib/util/time.c | 8 |
2 files changed, 1 insertions, 11 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 17c40dd30d..9454daceee 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -449,9 +449,7 @@ struct dom_sid *samdb_result_sid_prefix(TALLOC_CTX *mem_ctx, const struct ldb_me */ 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); } /* diff --git a/source4/lib/util/time.c b/source4/lib/util/time.c index c800fffea0..4601833a3d 100644 --- a/source4/lib/util/time.c +++ b/source4/lib/util/time.c @@ -374,14 +374,6 @@ _PUBLIC_ NTTIME pull_nttime(uint8_t *base, uint16_t offset) } /** - 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) |