ldb: Fix CID 241329 Array compared against 0
authorVolker Lendecke <vl@samba.org>
Sat, 9 Nov 2013 20:29:24 +0000 (21:29 +0100)
committerIra Cooper <ira@samba.org>
Mon, 11 Nov 2013 20:04:09 +0000 (21:04 +0100)
u.generate.remote_names is an array, not a pointer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
lib/ldb/ldb_map/ldb_map.c

index 52b483bafe5c1ec80249fbafb9565c571981ee16..66b00592921e994164d33462a3d995d92f94eda6 100644 (file)
@@ -340,7 +340,7 @@ const struct ldb_map_attribute *map_attr_find_remote(const struct ldb_map_contex
                        break;
 
                case LDB_MAP_GENERATE:
-                       for (j = 0; map->u.generate.remote_names && map->u.generate.remote_names[j]; j++) {
+                       for (j = 0; map->u.generate.remote_names[j]; j++) {
                                if (ldb_attr_cmp(map->u.generate.remote_names[j], name) == 0) {
                                        return map;
                                }