From f61062b31d8d58f7f1ddd0f9f7932ca6f6499aaa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 27 Mar 2007 10:20:50 +0000 Subject: r21980: make use of tdb_*_bystring() and string_term_tdb_data() in smbd/ to avoid creating the TDB_DATA struct from strings "by hand" metze (This used to be commit 09b477ed85e46bc780ce3c1461472883a6b952f9) --- source3/smbd/mangle_hash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/smbd/mangle_hash.c') diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index 320e31ab67..f20e473079 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -437,8 +437,7 @@ static void cache_mangled_name( const char mangled_name[13], char *raw_name ) } /* Allocate a new cache entry. If the allocation fails, just return. */ - data_val.dptr = raw_name; - data_val.dsize = strlen(raw_name)+1; + data_val = string_term_tdb_data(raw_name); if (tdb_store_bystring(tdb_mangled_cache, mangled_name_key, data_val, TDB_REPLACE) != 0) { DEBUG(0,("cache_mangled_name: Error storing entry %s -> %s\n", mangled_name_key, raw_name)); } else { -- cgit