r14436: mixing of boolean expressions and integers isn't allowed
authorAndrew Tridgell <tridge@samba.org>
Wed, 15 Mar 2006 05:53:56 +0000 (05:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:24 +0000 (13:57 -0500)
(This used to be commit 6f7d09262d2e92df137167da55f5a22f32490781)

source4/lib/ldb/modules/ldb_map.c

index f313a6e564b69a7eb69648fb46c6b58bdae3c766..ecb49de4404e7908cb2e1d2e8fe62085fe73f7ad 100644 (file)
@@ -543,7 +543,7 @@ static const char **available_local_attributes(struct ldb_module *module, const
        ret[0] = NULL;
 
        for (i = 0; privdat->attribute_maps[i].local_name; i++) {
-               int avail = 0;
+               BOOL avail = False;
                const struct ldb_map_attribute *attr = &privdat->attribute_maps[i];
 
                /* If all remote attributes for this attribute are present, add the 
@@ -561,9 +561,9 @@ static const char **available_local_attributes(struct ldb_module *module, const
                                break;
 
                case MAP_GENERATE:
-                               avail = 1;
+                               avail = True;
                                for (j = 0; attr->u.generate.remote_names[j]; j++) {
-                                       avail &= (ldb_msg_find_ldb_val(msg, attr->u.generate.remote_names[j]) != NULL);
+                                       avail &= (BOOL)(ldb_msg_find_ldb_val(msg, attr->u.generate.remote_names[j]) != NULL);
                                }
                                break;
                }