r7559: support 64 bit matching in bitops
authorAndrew Tridgell <tridge@samba.org>
Tue, 14 Jun 2005 02:33:49 +0000 (02:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:08 +0000 (13:18 -0500)
(This used to be commit 0c44a67001b9ae91c1ba7fc52f22d1eafc22dcc7)

source4/lib/ldb/ldb_tdb/ldb_match.c

index 5bc59383a5fa68b9673c7c074728d3a49af9dda2..51b0ab9aa76a5d8db161a9188923cbe3a5323b58 100644 (file)
@@ -301,9 +301,9 @@ static int match_leaf(struct ldb_module *module,
 */
 static int comparator_and(struct ldb_val *v1, struct ldb_val *v2)
 {
-       unsigned i1, i2;
-       i1 = strtoul(v1->data, NULL, 0);
-       i2 = strtoul(v2->data, NULL, 0);
+       uint64_t i1, i2;
+       i1 = strtoull(v1->data, NULL, 0);
+       i2 = strtoull(v2->data, NULL, 0);
        return ((i1 & i2) == i2);
 }
 
@@ -312,9 +312,9 @@ static int comparator_and(struct ldb_val *v1, struct ldb_val *v2)
 */
 static int comparator_or(struct ldb_val *v1, struct ldb_val *v2)
 {
-       unsigned i1, i2;
-       i1 = strtoul(v1->data, NULL, 0);
-       i2 = strtoul(v2->data, NULL, 0);
+       uint64_t i1, i2;
+       i1 = strtoull(v1->data, NULL, 0);
+       i2 = strtoull(v2->data, NULL, 0);
        return ((i1 & i2) != 0);
 }