]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: correct comments in attrib_handers val_to_int64
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 5 Mar 2021 20:57:44 +0000 (09:57 +1300)
committerStefan Metzmacher <metze@samba.org>
Tue, 2 Nov 2021 21:52:16 +0000 (21:52 +0000)
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 46e6f6ef8436df7e083f34556c25f66f65ea1ce5)

lib/ldb/common/attrib_handlers.c

index 6a885065f773673483fc508400a9fd959a131902..febf2f414ca09e1ba0e815d9f34a94d86250b79a 100644 (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;