tdb_store: check returns for 0, not -1.
[samba.git] / source3 / libsmb / samlogon_cache.c
index 67c0e08114a2f19a485fdd1553f6d0df2f1ff94c..618a570c4e05a20d89ef3886d8570663f3accdc0 100644 (file)
@@ -179,7 +179,7 @@ bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
        data.dsize = blob.length;
        data.dptr = blob.data;
 
-       if (tdb_store_bystring(netsamlogon_tdb, keystr, data, TDB_REPLACE) != -1) {
+       if (tdb_store_bystring(netsamlogon_tdb, keystr, data, TDB_REPLACE) == 0) {
                result = true;
        }