1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ldb: correct comments in attrib_handers val_to_int64

c.f. the identical static function in lib/ldb-samba/ldif_handlers.c

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 46e6f6ef84)
This commit is contained in:
Douglas Bagnall 2021-03-06 09:57:44 +13:00 committed by Stefan Metzmacher
parent e4741f2a11
commit 461096c521

View File

@ -97,7 +97,7 @@ int ldb_handler_fold(struct ldb_context *ldb, void *mem_ctx,
return 0;
}
/* length limited conversion of a ldb_val to a int32_t */
/* length limited conversion of a ldb_val to an int64_t */
static int val_to_int64(const struct ldb_val *in, int64_t *v)
{
char *end;
@ -110,8 +110,6 @@ static int val_to_int64(const struct ldb_val *in, int64_t *v)
strncpy(buf, (char *)in->data, in->length);
buf[in->length] = 0;
/* We've to use "strtoll" here to have the intended overflows.
* Otherwise we may get "LONG_MAX" and the conversion is wrong. */
*v = (int64_t) strtoll(buf, &end, 0);
if (*end != 0) {
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;