tdb_store: check returns for 0, not -1.
[ira/wip.git] / source4 / lib / ldb / ldb_tdb / ldb_index.c
index 45e747379f364668d0e8ab59febad359631f2a6b..0e9f1e75ddf8f9e3577404eaeaad20fa7d1da413 100644 (file)
@@ -294,7 +294,7 @@ static int ltdb_dn_list_store(struct ldb_module *module, struct ldb_dn *dn,
        rec.dsize = sizeof(void *);
 
        ret = tdb_store(ltdb->idxptr->itdb, key, rec, TDB_INSERT);
-       if (ret == -1) {
+       if (ret != 0) {
                return ltdb_err_map(tdb_error(ltdb->idxptr->itdb));
        }
        return LDB_SUCCESS;