r24941: Simplify samdb_result_nttime(), and remove nttime_from_string()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 4 Sep 2007 02:08:36 +0000 (02:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:03:40 +0000 (15:03 -0500)
Andrew Bartlett
(This used to be commit bcd994a139e2e8fb2e97c8b897c987ff234e0b0a)

source4/dsdb/samdb/samdb.c
source4/lib/util/time.c

index 17c40dd30d09bb5608b0a6aab8d240908f8535c2..9454daceee168b14810d8a22977bf5e4d4ed56fb 100644 (file)
@@ -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)
 {
 */
 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);
 }
 
 /*
 }
 
 /*
index c800fffea0c19831bb8882efc9309f1f9ee9ed5e..4601833a3d263f8cbebc7c0ca46a3c01ce39fe9e 100644 (file)
@@ -373,14 +373,6 @@ _PUBLIC_ NTTIME pull_nttime(uint8_t *base, uint16_t offset)
        return ret;
 }
 
        return ret;
 }
 
-/**
-  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
 */
 /**
   return (tv1 - tv2) in microseconds
 */