tdb_delete used as traversal function

andreas moroder claudiamoroder at st-ulrich.suedtirol.net
Thu Jan 3 13:19:02 GMT 2002


Hello,

in the following files

./groupdb/mapping.c
./lib/account_pol.c:		
./intl/lang_tdb.c:	
./printing/nt_printing.c:
./printing/printing.c:
./rpc_server/srv_srvsvc_nt.c:        

tdb_delete is used as paramter to tdb_traverse

but tdb_delete has only two parameters 

int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key)


while tdb_traverse passes 4 of them

if (fn && fn(tdb, key, dbuf, state)) 

Should not 

static int do_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf,
                     void *state)
{
    return tdb_delete(the_tdb, key);
}

in tdb/tdbtool.c be used instead ? 


Bye

Andreas

P.S. The comment before tdb_traverse is also wrong, it forgets the paramter 
state.





More information about the samba-technical mailing list