summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e487983)
It's only used in two files, make it static in one and do it manually
in the other.
/* @} ******************************************************************/
/* @} ******************************************************************/
-extern TDB_DATA tdb1_null;
-
#include "tdb1_private.h"
#include <assert.h>
#include "tdb1_private.h"
#include <assert.h>
/*
non-blocking increment of the tdb sequence number if the tdb has been opened using
the TDB_SEQNUM flag
/*
non-blocking increment of the tdb sequence number if the tdb has been opened using
the TDB_SEQNUM flag
/* find which hash bucket it is in */
hash = tdb_hash(tdb, key.dptr, key.dsize);
/* find which hash bucket it is in */
hash = tdb_hash(tdb, key.dptr, key.dsize);
- if (!(rec_ptr = tdb1_find_lock_hash(tdb,key,hash,F_RDLCK,&rec)))
- return tdb1_null;
+ if (!(rec_ptr = tdb1_find_lock_hash(tdb,key,hash,F_RDLCK,&rec))) {
+ ret.dptr = NULL;
+ ret.dsize = 0;
+ return ret;
+ }
ret.dptr = tdb1_alloc_read(tdb, rec_ptr + sizeof(rec) + rec.key_len,
rec.data_len);
ret.dptr = tdb1_alloc_read(tdb, rec_ptr + sizeof(rec) + rec.key_len,
rec.data_len);
#define TDB1_NEXT_LOCK_ERR ((tdb1_off_t)-1)
#define TDB1_NEXT_LOCK_ERR ((tdb1_off_t)-1)
+static TDB_DATA tdb1_null;
+
/* Uses traverse lock: 0 = finish, TDB1_NEXT_LOCK_ERR = error,
other = record offset */
static tdb1_off_t tdb1_next_lock(struct tdb_context *tdb, struct tdb1_traverse_lock *tlock,
/* Uses traverse lock: 0 = finish, TDB1_NEXT_LOCK_ERR = error,
other = record offset */
static tdb1_off_t tdb1_next_lock(struct tdb_context *tdb, struct tdb1_traverse_lock *tlock,