From bee9fda243f43b63ad460081b72316c172303541 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 7 Jun 2009 19:08:52 +0200 Subject: Add tldap_pull_uint32 --- source3/lib/tldap_util.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/lib/tldap_util.c') diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c index 1f2cc1d8de..1b0c3446ee 100644 --- a/source3/lib/tldap_util.c +++ b/source3/lib/tldap_util.c @@ -349,3 +349,15 @@ bool tldap_pull_uint64(struct tldap_message *msg, const char *attr, *presult = result; return true; } + +bool tldap_pull_uint32(struct tldap_message *msg, const char *attr, + uint32_t *presult) +{ + uint64_t result; + + if (!tldap_pull_uint64(msg, attr, &result)) { + return false; + } + *presult = (uint32_t)result; + return true; +} -- cgit