diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-07 02:38:42 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-07 02:38:42 +0000 |
commit | 47955b2f6cd10ac690705d322a8862c23f18072c (patch) | |
tree | 457151a2a3cc4ac3598c7cb45850b6dd598de03a /source3/tdb/tdbutil.c | |
parent | bcf0c11e3d4477eb029a0259ed17db9ddbe706d5 (diff) | |
download | samba-47955b2f6cd10ac690705d322a8862c23f18072c.tar.gz samba-47955b2f6cd10ac690705d322a8862c23f18072c.tar.bz2 samba-47955b2f6cd10ac690705d322a8862c23f18072c.zip |
Merge of scalable printing code fix... Needs testing.
Also tidied up some of Richard's code (I don't think he uses the compiler
flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like
I do :-) :-).
Jeremy.
(This used to be commit 10024ed06e9d91f24fdc78d59eef2f76bf395438)
Diffstat (limited to 'source3/tdb/tdbutil.c')
-rw-r--r-- | source3/tdb/tdbutil.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c index e7650033b8..ad97f45044 100644 --- a/source3/tdb/tdbutil.c +++ b/source3/tdb/tdbutil.c @@ -218,17 +218,14 @@ BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value) on failure. ****************************************************************************/ -int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, void *buffer, int len) +int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, TDB_DATA data, int flags) { - TDB_DATA key, data; + TDB_DATA key; key.dptr = keystr; key.dsize = strlen(keystr) + 1; - data.dptr = buffer; - data.dsize = len; - - return tdb_store(tdb, key, data, TDB_REPLACE); + return tdb_store(tdb, key, data, flags); } /**************************************************************************** @@ -247,17 +244,17 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr) } /**************************************************************************** - Delete a buffer using a null terminated string key. + Delete an entry using a null terminated string key. ****************************************************************************/ int tdb_delete_by_string(TDB_CONTEXT *tdb, char *keystr) { - TDB_DATA key; + TDB_DATA key; - key.dptr = keystr; - key.dsize = strlen(keystr) + 1; + key.dptr = keystr; + key.dsize = strlen(keystr) + 1; - return tdb_delete(tdb, key); + return tdb_delete(tdb, key); } /**************************************************************************** |