mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
idmap_tdb: Avoid a few casts
The times of attempting to be C++ compatible are gone since C compilers can do very good warnings too. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
parent
c0e196b223
commit
7ff3ae7374
@ -51,11 +51,9 @@ static NTSTATUS idmap_tdb_common_allocate_id_action(struct db_context *db,
|
||||
void *private_data)
|
||||
{
|
||||
NTSTATUS ret;
|
||||
struct idmap_tdb_common_allocate_id_context *state;
|
||||
struct idmap_tdb_common_allocate_id_context *state = private_data;
|
||||
uint32_t hwm;
|
||||
|
||||
state = (struct idmap_tdb_common_allocate_id_context *)private_data;
|
||||
|
||||
ret = dbwrap_fetch_uint32_bystring(db, state->hwmkey, &hwm);
|
||||
if (!NT_STATUS_IS_OK(ret)) {
|
||||
ret = NT_STATUS_INTERNAL_DB_ERROR;
|
||||
@ -180,11 +178,9 @@ static NTSTATUS idmap_tdb_common_set_mapping_action(struct db_context *db,
|
||||
{
|
||||
TDB_DATA data;
|
||||
NTSTATUS ret;
|
||||
struct idmap_tdb_common_set_mapping_context *state;
|
||||
struct idmap_tdb_common_set_mapping_context *state = private_data;
|
||||
TALLOC_CTX *tmp_ctx = talloc_stackframe();
|
||||
|
||||
state = (struct idmap_tdb_common_set_mapping_context *)private_data;
|
||||
|
||||
DEBUG(10, ("Storing %s <-> %s map\n", state->ksidstr, state->kidstr));
|
||||
|
||||
/* check whether sid mapping is already present in db */
|
||||
@ -546,12 +542,10 @@ struct idmap_tdb_common_sids_to_unixids_context {
|
||||
static NTSTATUS idmap_tdb_common_sids_to_unixids_action(struct db_context *db,
|
||||
void *private_data)
|
||||
{
|
||||
struct idmap_tdb_common_sids_to_unixids_context *state;
|
||||
struct idmap_tdb_common_sids_to_unixids_context *state = private_data;
|
||||
int i, num_mapped = 0;
|
||||
NTSTATUS ret = NT_STATUS_OK;
|
||||
|
||||
state = (struct idmap_tdb_common_sids_to_unixids_context *)private_data;
|
||||
|
||||
DEBUG(10, ("idmap_tdb_common_sids_to_unixids: "
|
||||
" domain: [%s], allocate: %s\n",
|
||||
state->dom->name, state->allocate_unmapped ? "yes" : "no"));
|
||||
|
Loading…
Reference in New Issue
Block a user