X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Ftdb.c;h=0db9a358381c94a2e540430a271891255f10b730;hp=cb2af49f8f9f7b8bb29c4f86d0624712579543ea;hb=91ddc0b7f90986495f014217451361c07fdcd856;hpb=bcf7916c5d694858766869dfd570e525127154a6 diff --git a/ccan/tdb/tdb.c b/ccan/tdb/tdb.c index cb2af49f..0db9a358 100644 --- a/ccan/tdb/tdb.c +++ b/ccan/tdb/tdb.c @@ -160,7 +160,7 @@ static int tdb_update_hash(struct tdb_context *tdb, TDB_DATA key, uint32_t hash, * then the TDB_DATA will have zero length but * a non-zero pointer */ -static TDB_DATA do_tdb_fetch(struct tdb_context *tdb, TDB_DATA key) +static TDB_DATA _tdb_fetch(struct tdb_context *tdb, TDB_DATA key) { tdb_off_t rec_ptr; struct list_struct rec; @@ -181,7 +181,7 @@ static TDB_DATA do_tdb_fetch(struct tdb_context *tdb, TDB_DATA key) TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key) { - TDB_DATA ret = do_tdb_fetch(tdb, key); + TDB_DATA ret = _tdb_fetch(tdb, key); tdb_trace_1rec_retrec(tdb, "tdb_fetch", key, ret); return ret; @@ -446,8 +446,8 @@ static tdb_off_t tdb_find_dead(struct tdb_context *tdb, uint32_t hash, return 0; } -static int _tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, - int flag, uint32_t hash) +static int _tdb_store(struct tdb_context *tdb, TDB_DATA key, + TDB_DATA dbuf, int flag, uint32_t hash) { struct list_struct rec; tdb_off_t rec_ptr; @@ -613,7 +613,7 @@ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf) if (tdb_lock(tdb, BUCKET(hash), F_WRLCK) == -1) return -1; - dbuf = do_tdb_fetch(tdb, key); + dbuf = _tdb_fetch(tdb, key); if (dbuf.dptr == NULL) { dbuf.dptr = (unsigned char *)malloc(new_dbuf.dsize);