diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/samlogon_cache.c | 2 | ||||
-rw-r--r-- | source3/libsmb/smb_share_modes.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c index 67c0e08114..618a570c4e 100644 --- a/source3/libsmb/samlogon_cache.c +++ b/source3/libsmb/samlogon_cache.c @@ -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; } diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c index 4477da6a19..e891b960d8 100644 --- a/source3/libsmb/smb_share_modes.c +++ b/source3/libsmb/smb_share_modes.c @@ -344,7 +344,7 @@ int smb_create_share_mode_entry_ex(struct smbdb_ctx *db_ctx, db_data.dsize = sizeof(struct locking_data) + sizeof(struct share_mode_entry) + strlen(sharepath) + 1 + strlen(filename) + 1; - if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_INSERT) == -1) { + if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_INSERT) != 0) { free(db_data.dptr); return -1; } @@ -387,7 +387,7 @@ int smb_create_share_mode_entry_ex(struct smbdb_ctx *db_ctx, db_data.dptr = new_data_p; db_data.dsize = new_data_size; - if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_REPLACE) == -1) { + if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_REPLACE) != 0) { free(db_data.dptr); return -1; } @@ -510,7 +510,7 @@ int smb_delete_share_mode_entry(struct smbdb_ctx *db_ctx, db_data.dsize = sizeof(struct locking_data) + (num_share_modes * sizeof(struct share_mode_entry)) + remaining_size; - if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_REPLACE) == -1) { + if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_REPLACE) != 0) { free(db_data.dptr); return -1; } @@ -565,7 +565,7 @@ int smb_change_share_mode_entry(struct smbdb_ctx *db_ctx, } /* Save modified data. */ - if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_REPLACE) == -1) { + if (tdb_store(db_ctx->smb_tdb, locking_key, db_data, TDB_REPLACE) != 0) { free(db_data.dptr); return -1; } |